Skip to content

Commit

Permalink
Fix warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
atanunq committed Aug 29, 2021
1 parent 42cd38c commit 5cae4d2
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/printer/block.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ fn print_to_writecolor(
adjust_offset(stdout, &Config { x: 0, ..*config })?;

// resize the image so that it fits in the constraints, if any
let img = super::resize(&img, config.width, config.height);
let img = super::resize(img, config.width, config.height);
let (width, height) = img.dimensions();

let mut row_color_buffer: Vec<ColorSpec> = vec![ColorSpec::new(); width as usize];
Expand Down
2 changes: 1 addition & 1 deletion src/printer/iterm.rs
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ fn print_buffer(
) -> ViuResult<(u32, u32)> {
adjust_offset(stdout, config)?;

let (w, h) = find_best_fit(&img, config.width, config.height);
let (w, h) = find_best_fit(img, config.width, config.height);

writeln!(
stdout,
Expand Down
4 changes: 2 additions & 2 deletions src/printer/kitty.rs
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ fn print_local(
adjust_offset(stdout, config)?;

// get the desired width and height
let (w, h) = find_best_fit(&img, config.width, config.height);
let (w, h) = find_best_fit(img, config.width, config.height);

write!(
stdout,
Expand Down Expand Up @@ -164,7 +164,7 @@ fn print_remote(

adjust_offset(stdout, config)?;

let (w, h) = find_best_fit(&img, config.width, config.height);
let (w, h) = find_best_fit(img, config.width, config.height);

let first_chunk: String = iter.by_ref().take(4096).collect();

Expand Down
2 changes: 1 addition & 1 deletion src/printer/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ mod tests {

fn test_adjust_offset_output(config: &Config, str: &str) {
let mut vec = Vec::new();
adjust_offset(&mut vec, &config).unwrap();
adjust_offset(&mut vec, config).unwrap();
assert_eq!(std::str::from_utf8(&vec).unwrap(), str);
}

Expand Down
2 changes: 1 addition & 1 deletion src/printer/sixel.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ impl Printer for SixelPrinter {
img: &DynamicImage,
config: &Config,
) -> ViuResult<(u32, u32)> {
let (w, h) = find_best_fit(&img, config.width, config.height);
let (w, h) = find_best_fit(img, config.width, config.height);

//TODO: the max 1000 width is an xterm bug workaround, other terminals may not be affected
let resized_img =
Expand Down

0 comments on commit 5cae4d2

Please sign in to comment.