Skip to content

Commit

Permalink
Fix build.
Browse files Browse the repository at this point in the history
  • Loading branch information
RazrFalcon committed Feb 8, 2024
1 parent a88dac4 commit 15112ff
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
10 changes: 5 additions & 5 deletions crates/usvg/src/parser/converter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ pub struct Cache {
impl Cache {
// TODO: macros?
#[cfg(feature = "text")]
pub fn gen_linear_gradient_id(&mut self) -> NonEmptyString {
pub(crate) fn gen_linear_gradient_id(&mut self) -> NonEmptyString {
loop {
self.linear_gradient_index += 1;
let new_id = format!("linearGradient{}", self.linear_gradient_index);
Expand All @@ -62,7 +62,7 @@ impl Cache {
}

#[cfg(feature = "text")]
pub fn gen_radial_gradient_id(&mut self) -> NonEmptyString {
pub(crate) fn gen_radial_gradient_id(&mut self) -> NonEmptyString {
loop {
self.radial_gradient_index += 1;
let new_id = format!("radialGradient{}", self.radial_gradient_index);
Expand All @@ -74,7 +74,7 @@ impl Cache {
}

#[cfg(feature = "text")]
pub fn gen_pattern_id(&mut self) -> NonEmptyString {
pub(crate) fn gen_pattern_id(&mut self) -> NonEmptyString {
loop {
self.pattern_index += 1;
let new_id = format!("pattern{}", self.pattern_index);
Expand All @@ -85,7 +85,7 @@ impl Cache {
}
}

pub fn gen_clip_path_id(&mut self) -> NonEmptyString {
pub(crate) fn gen_clip_path_id(&mut self) -> NonEmptyString {
loop {
self.clip_path_index += 1;
let new_id = format!("clipPath{}", self.clip_path_index);
Expand All @@ -96,7 +96,7 @@ impl Cache {
}
}

pub fn gen_filter_id(&mut self) -> NonEmptyString {
pub(crate) fn gen_filter_id(&mut self) -> NonEmptyString {
loop {
self.filter_index += 1;
let new_id = format!("filter{}", self.filter_index);
Expand Down
3 changes: 1 addition & 2 deletions tools/explorer-thumbnailer/src/utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,7 @@ pub unsafe fn tree_from_istream(pstream: LPSTREAM) -> Result<usvg::Tree, Error>
let mut fontdb = fontdb::Database::new();
fontdb.load_system_fonts();

let mut tree = usvg::Tree::from_data(&svg_data, &opt).map_err(|e| Error::TreeError(e))?;
tree.postprocess(usvg::PostProcessingSteps::default(), &fontdb);
let tree = usvg::Tree::from_data(&svg_data, &opt, &fontdb).map_err(|e| Error::TreeError(e))?;
Ok(tree)
}

Expand Down

0 comments on commit 15112ff

Please sign in to comment.