[librsvg: 4/17] Stylesheet::empty() - rename from new() and make private




commit c8a23dfb6d63ca7d4278efdd3dc10ab96532bb99
Author: Federico Mena Quintero <federico gnome org>
Date:   Mon Aug 29 12:58:35 2022 -0500

    Stylesheet::empty() - rename from new() and make private
    
    Part-of: <https://gitlab.gnome.org/GNOME/librsvg/-/merge_requests/738>

 src/css.rs | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/src/css.rs b/src/css.rs
index de3ffb898..8ef48e237 100644
--- a/src/css.rs
+++ b/src/css.rs
@@ -795,7 +795,7 @@ impl<'a> PartialEq for Match<'a> {
 impl<'a> Eq for Match<'a> {}
 
 impl Stylesheet {
-    pub fn new(origin: Origin) -> Stylesheet {
+    fn empty(origin: Origin) -> Stylesheet {
         Stylesheet {
             origin,
             qualified_rules: Vec::new(),
@@ -808,7 +808,7 @@ impl Stylesheet {
         origin: Origin,
         session: Session,
     ) -> Result<Self, LoadingError> {
-        let mut stylesheet = Stylesheet::new(origin);
+        let mut stylesheet = Stylesheet::empty(origin);
         stylesheet.parse(buf, url_resolver, session)?;
         Ok(stylesheet)
     }
@@ -819,7 +819,7 @@ impl Stylesheet {
         origin: Origin,
         session: Session,
     ) -> Result<Self, LoadingError> {
-        let mut stylesheet = Stylesheet::new(origin);
+        let mut stylesheet = Stylesheet::empty(origin);
         let aurl = url_resolver
             .resolve_href(href)
             .map_err(|_| LoadingError::BadUrl)?;


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