[librsvg/update-clap] The arguments for input files must be OsString
- From: Federico Mena Quintero <federico src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [librsvg/update-clap] The arguments for input files must be OsString
- Date: Tue, 20 Sep 2022 16:53:10 +0000 (UTC)
commit a4072e48e869b88f2228b9b6f1d0a9e14aaebc4b
Author: Federico Mena Quintero <federico gnome org>
Date: Tue Sep 20 11:24:16 2022 -0500
The arguments for input files must be OsString
They can be filenames, or URIs.
src/bin/rsvg-convert.rs | 3 +++
1 file changed, 3 insertions(+)
---
diff --git a/src/bin/rsvg-convert.rs b/src/bin/rsvg-convert.rs
index 26bde8a24..a3c7caa2d 100644
--- a/src/bin/rsvg-convert.rs
+++ b/src/bin/rsvg-convert.rs
@@ -25,6 +25,8 @@ use librsvg::rsvg_convert_only::{
PathOrUrl, Rect, Signed, ULength, Unsigned, Validate, Vertical, ViewBox,
};
use librsvg::{AcceptLanguage, CairoRenderer, Color, Language, LengthUnit, Loader, RenderingError};
+
+use std::ffi::OsString;
use std::ops::Deref;
use std::path::PathBuf;
@@ -965,6 +967,7 @@ fn parse_args() -> Result<Converter, Error> {
)
.arg(
clap::Arg::with_name("FILE")
+ .value_parser(clap::value_parser!(OsString))
.help("The input file(s) to convert")
.multiple(true),
);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]