[librsvg/rustify-rsvg-convert: 3/9] rsvg-convert: reword comment to not mention the old api




commit 85a5fff72194dae247853dbb8a01c7a2d446a3cd
Author: Paolo Borelli <pborelli gnome org>
Date:   Sun Jan 17 10:17:07 2021 +0100

    rsvg-convert: reword comment to not mention the old api

 src/bin/rsvg-convert/main.rs | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)
---
diff --git a/src/bin/rsvg-convert/main.rs b/src/bin/rsvg-convert/main.rs
index 98cd8aeb..bd64f5d5 100644
--- a/src/bin/rsvg-convert/main.rs
+++ b/src/bin/rsvg-convert/main.rs
@@ -597,12 +597,10 @@ fn parse_args() -> Result<Converter, clap::Error> {
 
     let background_color = value_t!(matches, "background", String).and_then(parse_color_string);
 
+    // librsvg expects ids starting with '#', so it can lookup ids in externs like "subfile.svg#subid".
+    // For the user's convenience, we prepend '#' automatically; we only support specifying ids from
+    // the toplevel, and don't expect users to lookup things in externs.
     let lookup_id = |id: String| {
-        // RsvgHandle::has_sub() expects ids to have a '#' prepended to them,
-        // so it can lookup ids in externs like "subfile.svg#subid".  For the
-        // user's convenience, we include this '#' automatically; we only
-        // support specifying ids from the toplevel, and don't expect users to
-        // lookup things in externs.
         if id.starts_with('#') {
             id
         } else {


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]