[librsvg: 11/13] Remove superfluous ? operators, per clippy
- From: Federico Mena Quintero <federico src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [librsvg: 11/13] Remove superfluous ? operators, per clippy
- Date: Mon, 12 Apr 2021 16:15:02 +0000 (UTC)
commit 197907c86a41ee8dfa05783cf20d9961e5909756
Author: Federico Mena Quintero <federico gnome org>
Date: Mon Apr 12 11:00:33 2021 -0500
Remove superfluous ? operators, per clippy
src/api.rs | 2 +-
src/filters/mod.rs | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/src/api.rs b/src/api.rs
index ac3e2da0..0b83601c 100644
--- a/src/api.rs
+++ b/src/api.rs
@@ -209,7 +209,7 @@ impl Loader {
}
fn url_from_file(file: &gio::File) -> Result<Url, LoadingError> {
- Ok(Url::parse(&file.get_uri()).map_err(|_| LoadingError::BadUrl)?)
+ Url::parse(&file.get_uri()).map_err(|_| LoadingError::BadUrl)
}
/// Handle used to hold SVG data in memory.
diff --git a/src/filters/mod.rs b/src/filters/mod.rs
index 1dcf73c5..910388c9 100644
--- a/src/filters/mod.rs
+++ b/src/filters/mod.rs
@@ -114,7 +114,7 @@ impl Parse for Input {
fn parse<'i>(parser: &mut Parser<'i, '_>) -> Result<Self, ParseError<'i>> {
parser
.try_parse(|p| {
- Ok(parse_identifiers!(
+ parse_identifiers!(
p,
"SourceGraphic" => Input::SourceGraphic,
"SourceAlpha" => Input::SourceAlpha,
@@ -122,7 +122,7 @@ impl Parse for Input {
"BackgroundAlpha" => Input::BackgroundAlpha,
"FillPaint" => Input::FillPaint,
"StrokePaint" => Input::StrokePaint,
- )?)
+ )
})
.or_else(|_: BasicParseError<'_>| {
let ident = CustomIdent::parse(parser)?;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]