mirror of
https://github.com/sharkdp/bat.git
synced 2025-09-11 07:42:35 +01:00
Fix warnings, sort imports, input from string
This commit is contained in:
@@ -10,7 +10,7 @@ use syntect::parsing::{SyntaxReference, SyntaxSet, SyntaxSetBuilder};
|
||||
|
||||
use crate::assets_metadata::AssetsMetadata;
|
||||
use crate::errors::*;
|
||||
use crate::input::{Input, InputKind, InputReader, OpenedInput, OpenedInputKind};
|
||||
use crate::input::{InputReader, OpenedInput, OpenedInputKind};
|
||||
use crate::syntax_mapping::{MappingTarget, SyntaxMapping};
|
||||
|
||||
#[derive(Debug)]
|
||||
@@ -257,13 +257,14 @@ impl HighlightingAssets {
|
||||
mod tests {
|
||||
use super::*;
|
||||
|
||||
use std::ffi::{OsStr, OsString};
|
||||
use std::ffi::OsStr;
|
||||
use std::fs::File;
|
||||
use std::io;
|
||||
use std::io::Write;
|
||||
|
||||
use tempdir::TempDir;
|
||||
|
||||
use crate::input::Input;
|
||||
|
||||
struct SyntaxDetectionTest<'a> {
|
||||
assets: HighlightingAssets,
|
||||
pub syntax_mapping: SyntaxMapping<'a>,
|
||||
@@ -287,7 +288,7 @@ mod tests {
|
||||
writeln!(temp_file, "{}", first_line).unwrap();
|
||||
}
|
||||
|
||||
let input: Input = Input::ordinary_file(file_path.as_os_str());
|
||||
let input = Input::ordinary_file(file_path.as_os_str());
|
||||
let dummy_stdin: &[u8] = &[];
|
||||
let mut opened_input = input.open(dummy_stdin).unwrap();
|
||||
let syntax = self
|
||||
|
Reference in New Issue
Block a user