Skip to content

Commit

Permalink
Fix build.
Browse files Browse the repository at this point in the history
  • Loading branch information
RazrFalcon committed Feb 11, 2024
1 parent cadb172 commit 20c8dcc
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions crates/usvg/src/parser/converter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,13 @@ fn string_hash(s: &str) -> u64 {
}

impl<'a, 'input: 'a> SvgNode<'a, 'input> {
pub fn convert_length(&self, aid: AId, object_units: Units, state: &State, def: Length) -> f32 {
pub(crate) fn convert_length(
&self,
aid: AId,
object_units: Units,
state: &State,
def: Length,
) -> f32 {
units::convert_length(
self.attribute(aid).unwrap_or(def),
*self,
Expand Down Expand Up @@ -169,7 +175,12 @@ impl<'a, 'input: 'a> SvgNode<'a, 'input> {
NonZeroPositiveF32::new(n)
}

pub fn try_convert_length(&self, aid: AId, object_units: Units, state: &State) -> Option<f32> {
pub(crate) fn try_convert_length(
&self,
aid: AId,
object_units: Units,
state: &State,
) -> Option<f32> {
Some(units::convert_length(
self.attribute(aid)?,
*self,
Expand Down

0 comments on commit 20c8dcc

Please sign in to comment.