[librsvg/update-clap] See if the keep_aspect option is present using the old method
- From: Federico Mena Quintero <federico src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [librsvg/update-clap] See if the keep_aspect option is present using the old method
- Date: Tue, 20 Sep 2022 16:53:10 +0000 (UTC)
commit 830f2c58620af84d4b28b8156053805d6aa9bff0
Author: Federico Mena Quintero <federico gnome org>
Date: Tue Sep 20 11:19:17 2022 -0500
See if the keep_aspect option is present using the old method
src/bin/rsvg-convert.rs | 7 +------
1 file changed, 1 insertion(+), 6 deletions(-)
---
diff --git a/src/bin/rsvg-convert.rs b/src/bin/rsvg-convert.rs
index b40439364..26bde8a24 100644
--- a/src/bin/rsvg-convert.rs
+++ b/src/bin/rsvg-convert.rs
@@ -921,7 +921,6 @@ fn parse_args() -> Result<Converter, Error> {
clap::Arg::with_name("keep_aspect")
.short('a')
.long("keep-aspect-ratio")
- .default_value("false")
.help("Preserve the aspect ratio"),
)
.arg(
@@ -1063,10 +1062,6 @@ fn parse_args() -> Result<Converter, Error> {
));
}
- let keep_aspect_ratio = *matches
- .get_one("keep_aspect")
- .expect("already provided default_value");
-
let export_id: Option<String> = matches.get_one::<String>("export_id").map(lookup_id);
Ok(Converter {
@@ -1083,7 +1078,7 @@ fn parse_args() -> Result<Converter, Error> {
page_size,
format,
export_id,
- keep_aspect_ratio,
+ keep_aspect_ratio: matches.contains_id("keep_aspect"),
background_color,
stylesheet: matches.value_of_os("stylesheet").map(PathBuf::from),
unlimited: matches.contains_id("unlimited"),
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]