Clippy
This commit is contained in:
parent
d6d5d9ebc4
commit
5ca1e45b66
7 changed files with 22 additions and 16 deletions
|
|
@ -36,12 +36,11 @@ impl<S: AsRef<Path>, U: AsRef<str>, R: CommandRunner> UserService<'_, S, U, R> {
|
|||
let result = self.command_runner.run_with_args("systemctl", args).await?;
|
||||
if result.status.success() {
|
||||
return Ok(String::from_utf8(result.stdout)?.trim_end().to_string());
|
||||
} else {
|
||||
let raw_stderr = String::from_utf8(result.stderr)?;
|
||||
let stderr = raw_stderr.trim_end();
|
||||
if stderr != "Failed to connect to bus: No such file or directory" {
|
||||
return Err(stderr.into());
|
||||
}
|
||||
}
|
||||
let raw_stderr = String::from_utf8(result.stderr)?;
|
||||
let stderr = raw_stderr.trim_end();
|
||||
if stderr != "Failed to connect to bus: No such file or directory" {
|
||||
return Err(stderr.into());
|
||||
}
|
||||
tries -= 1;
|
||||
if tries == 0 {
|
||||
|
|
|
|||
|
|
@ -53,7 +53,7 @@ impl<C: AsRef<str>, D: AsRef<Path>, R: CommandRunner> Translation<'_, C, D, R> {
|
|||
res.push((
|
||||
format!("https://translate.wordpress.org/projects/wp/{}/{}{}/default/export-translations?format={}", version_x, in_slug, path_locale, format),
|
||||
[self.path.as_ref(), format!("{}{}.{}", out_slug, self.locale.as_ref(), format).as_ref()].iter().collect()
|
||||
))
|
||||
));
|
||||
}
|
||||
}
|
||||
res
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue