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