[librsvg/update-clap: 8/11] The arguments for input files must be OsString
- From: Marge Bot <marge-bot src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [librsvg/update-clap: 8/11] The arguments for input files must be OsString
- Date: Tue, 20 Sep 2022 17:05:28 +0000 (UTC)
commit 3325479b65dd795a7f471d1016da8892af33ca95
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.
Part-of: <https://gitlab.gnome.org/GNOME/librsvg/-/merge_requests/748>
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]