mirror of
https://codeberg.org/icewind/rss-webhook-trigger.git
synced 2026-06-03 18:04:09 +02:00
clippy fixes
This commit is contained in:
parent
8ac57ca67e
commit
513488c73d
3 changed files with 4 additions and 4 deletions
|
|
@ -66,7 +66,7 @@
|
|||
};
|
||||
|
||||
devShells.default = pkgs.mkShell {
|
||||
nativeBuildInputs = with pkgs; [rustc cargo bacon cargo-edit cargo-outdated cargo-msrv];
|
||||
nativeBuildInputs = with pkgs; [toolchain bacon cargo-edit cargo-outdated cargo-msrv];
|
||||
};
|
||||
}
|
||||
)
|
||||
|
|
|
|||
|
|
@ -43,7 +43,7 @@ pub struct HeaderVal(String);
|
|||
impl<'de> Deserialize<'de> for HeaderVal {
|
||||
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error> where D: Deserializer<'de> {
|
||||
let raw = String::deserialize(deserializer)?;
|
||||
let str = load_secret(raw).map_err(|e| D::Error::custom(e))?;
|
||||
let str = load_secret(raw).map_err(D::Error::custom)?;
|
||||
Ok(HeaderVal(str))
|
||||
}
|
||||
}
|
||||
|
|
@ -58,7 +58,7 @@ impl TryFrom<&HeaderVal> for HeaderValue {
|
|||
|
||||
fn load_secret(raw: String) -> Result<String, std::io::Error> {
|
||||
let path: &Path = raw.as_ref();
|
||||
if raw.starts_with("/") && path.exists() {
|
||||
if raw.starts_with('/') && path.exists() {
|
||||
let raw = read_to_string(raw)?;
|
||||
Ok(raw.trim().into())
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -119,7 +119,7 @@ impl FeedFetcher {
|
|||
|
||||
Ok(hasher.finish())
|
||||
} else {
|
||||
return Err(eyre!("Invalid hub format {}", feed))
|
||||
Err(eyre!("Invalid hub format {}", feed))
|
||||
}
|
||||
} else {
|
||||
self.get_rss_feed_key(feed).await
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue