Rust dep updates

This commit is contained in:
Yorhel 2019-05-25 08:27:23 +02:00
parent fbd7b71d73
commit f0df5092c3
9 changed files with 431 additions and 467 deletions

View file

@ -190,7 +190,7 @@ impl<'a> ArchiveEntry<'a> {
str::from_utf8(c_str.to_bytes()).ok()
// Perform some simple opinionated normalization. Full normalization might be better,
// but also slower and more complex. This solution covers the most important cases.
.map(|s| s.trim_left_matches('/').trim_left_matches("./").trim_right_matches('/'))
.map(|s| s.trim_start_matches('/').trim_start_matches("./").trim_end_matches('/'))
}
pub fn size(&self) -> usize {

View file

@ -93,7 +93,7 @@ fn main() {
unsafe { pkg::DRY_RUN = arg.is_present("dry") };
let verbose = arg.occurrences_of("v");
env_logger::Builder::new()
env_logger::Builder::from_default_env()
.filter(Some("indexer"), match verbose {
0 => log::LevelFilter::Warn,
1 => log::LevelFilter::Info,

View file

@ -92,7 +92,7 @@ pub fn sync(pg: &postgres::GenericConnection, sys: i32, arch: &str, mirror: &str
fn trimext(n: &str) -> &str {
n.trim_right_matches(".tgz").trim_right_matches(".tbz")
n.trim_end_matches(".tgz").trim_end_matches(".tbz")
}