Skip to content

Commit

Permalink
fixed warnings and typos
Browse files Browse the repository at this point in the history
  • Loading branch information
garikello3d committed Dec 23, 2023
1 parent 1ca7b65 commit e55c1e5
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/arg_opts.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use std::{ffi::OsString, collections::{HashMap, HashSet}};
use std::{ffi::OsString, collections::HashMap};

#[derive(Debug, PartialEq, Eq)]
pub enum ArgModeSpecificOpts {
Expand Down Expand Up @@ -85,7 +85,7 @@ impl ArgOpts {

("config", true, vec![
(Mode::Restore, "full path to config file of the archive to restore"),
(Mode::Check, "full path to config file of the archive to restore")
(Mode::Check, "full path to config file of the archive to check")
], Kind::Valued, Some("/path/to/files000000.cfg")),

].into_iter().map(|(c, must, m, k, sample)|(c, OptProp{
Expand Down
4 changes: 4 additions & 0 deletions src/comp_decomp_2.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ pub struct Conv<'a, T: DataSink> {
}

impl<'a, T: DataSink> Conv<'a, T> {
#[allow(dead_code)]
pub fn get_sink(&'a self) -> &'a T {
self.t
}
Expand All @@ -31,10 +32,12 @@ impl<'a, T: DataSink> Compressor2<'a, T> {
Compressor2 { enc: XzEncoder::new(Conv{ t: to }, level) }
}

#[allow(dead_code)]
pub fn uncompressed(&self) -> usize {
self.enc.total_in() as usize
}

#[allow(dead_code)]
pub fn compressed(&self) -> usize {
self.enc.total_out() as usize
}
Expand Down Expand Up @@ -62,6 +65,7 @@ impl<'a, T: DataSink> Decompressor2<'a, T> {
Decompressor2 { dec: XzDecoder::new(Conv{ t: to }) }
}

#[allow(dead_code)]
pub fn get_decoder(&'a self) -> &XzDecoder<Conv<'a, T>> {
&self.dec
}
Expand Down
3 changes: 1 addition & 2 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,7 @@ mod free_space;
use free_space::get_free_space;

use std::time::{SystemTime, UNIX_EPOCH};
use std::io::{stdin, stdout};
use std::io::{Write, Read};
use std::io::Read;

pub fn backup<R: Read>(
mut read_from: R,
Expand Down

0 comments on commit e55c1e5

Please sign in to comment.