mirror of
https://github.com/sharkdp/bat.git
synced 2025-02-22 04:31:31 +01:00
Fixes mut issue
This commit is contained in:
parent
f3dde0185d
commit
5444b0dfed
@ -22,6 +22,7 @@ pub enum PagingMode {
|
|||||||
Never,
|
Never,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[derive(Clone)]
|
||||||
pub struct Config<'a> {
|
pub struct Config<'a> {
|
||||||
/// List of files to print
|
/// List of files to print
|
||||||
pub files: Vec<Option<&'a str>>,
|
pub files: Vec<Option<&'a str>>,
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
use errors::*;
|
use errors::*;
|
||||||
|
|
||||||
|
#[derive(Clone)]
|
||||||
pub struct LineRange {
|
pub struct LineRange {
|
||||||
pub lower: usize,
|
pub lower: usize,
|
||||||
pub upper: usize,
|
pub upper: usize,
|
||||||
|
@ -149,7 +149,7 @@ fn run() -> Result<bool> {
|
|||||||
Ok(true)
|
Ok(true)
|
||||||
}
|
}
|
||||||
_ => {
|
_ => {
|
||||||
let mut config = app.config()?;
|
let config = app.config()?;
|
||||||
let assets = HighlightingAssets::new();
|
let assets = HighlightingAssets::new();
|
||||||
|
|
||||||
if app.matches.is_present("list-languages") {
|
if app.matches.is_present("list-languages") {
|
||||||
@ -157,7 +157,7 @@ fn run() -> Result<bool> {
|
|||||||
|
|
||||||
Ok(true)
|
Ok(true)
|
||||||
} else if app.matches.is_present("list-themes") {
|
} else if app.matches.is_present("list-themes") {
|
||||||
list_themes(&assets, &mut config);
|
list_themes(&assets, &mut config.clone());
|
||||||
|
|
||||||
Ok(true)
|
Ok(true)
|
||||||
} else {
|
} else {
|
||||||
|
@ -59,6 +59,7 @@ impl FromStr for OutputComponent {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[derive(Clone)]
|
||||||
pub struct OutputComponents(pub HashSet<OutputComponent>);
|
pub struct OutputComponents(pub HashSet<OutputComponent>);
|
||||||
|
|
||||||
impl OutputComponents {
|
impl OutputComponents {
|
||||||
|
Loading…
Reference in New Issue
Block a user