Skip to content

Commit

Permalink
Address review comments.
Browse files Browse the repository at this point in the history
  • Loading branch information
xorgy committed Mar 22, 2024
1 parent c2383ed commit bb8c29d
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 212 deletions.
208 changes: 1 addition & 207 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions examples/scenes/src/pico_svg.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

//! A loader for a tiny fragment of SVG
use std::{num::ParseFloatError, str::FromStr};
use std::str::FromStr;

use roxmltree::{Document, Node};
use vello::{
Expand Down Expand Up @@ -188,7 +188,7 @@ fn parse_transform(transform: &str) -> Affine {
let vals = s
.split(|c| matches!(c, ',' | ' '))
.map(str::parse)
.collect::<Result<Vec<f64>, ParseFloatError>>()
.collect::<Result<Vec<f64>, _>>()
.expect("Could parse all values of 'matrix' as floats");
Affine::new(
vals.try_into()
Expand All @@ -199,7 +199,7 @@ fn parse_transform(transform: &str) -> Affine {
.split(|c| matches!(c, ',' | ' '))
.map(str::trim)
.map(str::parse)
.collect::<Result<Vec<f64>, ParseFloatError>>()
.collect::<Result<Vec<f64>, _>>()
{
match vals.as_slice() {
&[x, y] => Affine::translate(Vec2 { x, y }),
Expand All @@ -213,7 +213,7 @@ fn parse_transform(transform: &str) -> Affine {
.split(|c| matches!(c, ',' | ' '))
.map(str::trim)
.map(str::parse)
.collect::<Result<Vec<f64>, ParseFloatError>>()
.collect::<Result<Vec<f64>, _>>()
{
match *vals.as_slice() {
[x, y] => Affine::scale_non_uniform(x, y),
Expand Down
2 changes: 1 addition & 1 deletion examples/scenes/src/svg.rs
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ pub fn svg_function_of<R: AsRef<str>>(
(new_scene, size.to_vec2())
}
Err(e) => {
eprintln!("Failed to load svg, with Err({e})");
eprintln!("Failed to load svg: {e}");
let mut error_scene = Scene::new();
error_scene.fill(
Fill::NonZero,
Expand Down

0 comments on commit bb8c29d

Please sign in to comment.