pbs-client: clippy fixes
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
parent
82302ae27f
commit
3db2022713
@ -215,7 +215,7 @@ fn load_fingerprint(prefix: &str, server: &str) -> Option<String> {
|
||||
// usually ~/.config/<prefix>/fingerprints
|
||||
let path = base.place_config_file("fingerprints").ok()?;
|
||||
|
||||
let raw = std::fs::read_to_string(&path).ok()?;
|
||||
let raw = std::fs::read_to_string(path).ok()?;
|
||||
|
||||
for line in raw.split('\n') {
|
||||
let items: Vec<String> = line.split_whitespace().map(String::from).collect();
|
||||
@ -278,7 +278,7 @@ fn load_ticket_info(prefix: &str, server: &str, userid: &Userid) -> Option<(Stri
|
||||
|
||||
// usually /run/user/<uid>/...
|
||||
let path = base.place_runtime_file("tickets").ok()?;
|
||||
let data = file_get_json(&path, None).ok()?;
|
||||
let data = file_get_json(path, None).ok()?;
|
||||
let now = proxmox_time::epoch_i64();
|
||||
let ticket_lifetime = proxmox_auth_api::TICKET_LIFETIME - 60;
|
||||
let uinfo = data[server][userid.as_str()].as_object()?;
|
||||
|
@ -447,7 +447,7 @@ impl Archiver {
|
||||
let match_path = PathBuf::from("/").join(full_path.clone());
|
||||
if self
|
||||
.patterns
|
||||
.matches(match_path.as_os_str().as_bytes(), Some(stat.st_mode as u32))
|
||||
.matches(match_path.as_os_str().as_bytes(), Some(stat.st_mode))
|
||||
== Some(MatchType::Exclude)
|
||||
{
|
||||
continue;
|
||||
@ -533,7 +533,7 @@ impl Archiver {
|
||||
let match_path = PathBuf::from("/").join(self.path.clone());
|
||||
if self
|
||||
.patterns
|
||||
.matches(match_path.as_os_str().as_bytes(), Some(stat.st_mode as u32))
|
||||
.matches(match_path.as_os_str().as_bytes(), Some(stat.st_mode))
|
||||
== Some(MatchType::Exclude)
|
||||
{
|
||||
return Ok(());
|
||||
|
@ -414,7 +414,7 @@ pub fn complete_repository(_arg: &str, _param: &HashMap<String, String>) -> Vec<
|
||||
_ => return result,
|
||||
};
|
||||
|
||||
let data = file_get_json(&path, None).unwrap_or_else(|_| json!({}));
|
||||
let data = file_get_json(path, None).unwrap_or_else(|_| json!({}));
|
||||
|
||||
if let Some(map) = data.as_object() {
|
||||
for (repo, _count) in map {
|
||||
|
Loading…
x
Reference in New Issue
Block a user