-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
553 additions
and
165 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,11 @@ | ||
# Project Dependencies | ||
Package: yesvgmap | ||
Version: 0.2.5 | ||
Generated: 2022-01-24 21:48:17 UTC | ||
Version: 0.3.0 | ||
Generated: 2022-01-28 21:59:03 UTC | ||
|
||
| Package | Version | Author(s) | License | | ||
| ---- | ---- | ---- | ---- | | ||
| [ahash](https://github.com/tkaitchuck/ahash) | 0.7.6 | [Tom Kaitchuck](mailto:[email protected]) | Apache-2.0 or MIT | | ||
| [aho-corasick](https://github.com/BurntSushi/aho-corasick) | 0.7.18 | [Andrew Gallant](mailto:[email protected]) | MIT or Unlicense | | ||
| [argyle](https://github.com/Blobfolio/argyle) | 0.5.2 | [Blobfolio, LLC.](mailto:[email protected]) | WTFPL | | ||
| [bitflags](https://github.com/bitflags/bitflags) | 1.3.2 | The Rust Project Developers | Apache-2.0 or MIT | | ||
| [cfg-if](https://github.com/alexcrichton/cfg-if) | 1.0.0 | [Alex Crichton](mailto:[email protected]) | Apache-2.0 or MIT | | ||
|
@@ -19,14 +18,13 @@ | |
| [either](https://github.com/bluss/either) | 1.6.1 | bluss | Apache-2.0 or MIT | | ||
| [fastrand](https://github.com/smol-rs/fastrand) | 1.7.0 | [Stjepan Glavina](mailto:[email protected]) | Apache-2.0 or MIT | | ||
| [flume](https://github.com/zesterer/flume) | 0.10.10 | [Joshua Barretto](mailto:[email protected]) | Apache-2.0 or MIT | | ||
| [fyi_msg](https://github.com/Blobfolio/fyi) | 0.9.2 | [Blobfolio, LLC.](mailto:[email protected]) | WTFPL | | ||
| [fyi_msg](https://github.com/Blobfolio/fyi) | 0.9.3 | [Blobfolio, LLC.](mailto:[email protected]) | WTFPL | | ||
| [getrandom](https://github.com/rust-random/getrandom) | 0.2.4 | The Rand Project Developers | Apache-2.0 or MIT | | ||
| [hermit-abi](https://github.com/hermitcore/libhermit-rs) | 0.1.19 | Stefan Lankes | Apache-2.0 or MIT | | ||
| [instant](https://github.com/sebcrozet/instant) | 0.1.12 | [sebcrozet](mailto:[email protected]) | BSD-3-Clause | | ||
| [lazy_static](https://github.com/rust-lang-nursery/lazy-static.rs) | 1.4.0 | [Marvin Löbel](mailto:[email protected]) | Apache-2.0 or MIT | | ||
| [libc](https://github.com/rust-lang/libc) | 0.2.113 | The Rust Project Developers | Apache-2.0 or MIT | | ||
| [libc](https://github.com/rust-lang/libc) | 0.2.115 | The Rust Project Developers | Apache-2.0 or MIT | | ||
| [lock_api](https://github.com/Amanieu/parking_lot) | 0.4.5 | [Amanieu d'Antras](mailto:[email protected]) | Apache-2.0 or MIT | | ||
| [memchr](https://github.com/BurntSushi/memchr) | 2.4.1 | [Andrew Gallant](mailto:[email protected]) and bluss | MIT or Unlicense | | ||
| [memoffset](https://github.com/Gilnaa/memoffset) | 0.6.5 | [Gilad Naaman](mailto:[email protected]) | MIT | | ||
| [num-traits](https://github.com/rust-num/num-traits) | 0.2.14 | The Rust Project Developers | Apache-2.0 or MIT | | ||
| [num_cpus](https://github.com/seanmonstar/num_cpus) | 1.13.1 | [Sean McArthur](mailto:[email protected]) | Apache-2.0 or MIT | | ||
|
@@ -36,12 +34,11 @@ | |
| [rayon](https://github.com/rayon-rs/rayon) | 1.5.1 | [Niko Matsakis](mailto:[email protected]) and [Josh Stone](mailto:[email protected]) | Apache-2.0 or MIT | | ||
| [rayon-core](https://github.com/rayon-rs/rayon) | 1.9.1 | [Niko Matsakis](mailto:[email protected]) and [Josh Stone](mailto:[email protected]) | Apache-2.0 or MIT | | ||
| [redox_syscall](https://gitlab.redox-os.org/redox-os/syscall) | 0.2.10 | [Jeremy Soller](mailto:[email protected]) | MIT | | ||
| [regex](https://github.com/rust-lang/regex) | 1.5.4 | The Rust Project Developers | Apache-2.0 or MIT | | ||
| [regex-syntax](https://github.com/rust-lang/regex) | 0.6.25 | The Rust Project Developers | Apache-2.0 or MIT | | ||
| [remove_dir_all](https://github.com/XAMPPRocky/remove_dir_all.git) | 0.5.3 | [Aaronepower](mailto:[email protected]) | Apache-2.0 or MIT | | ||
| [scopeguard](https://github.com/bluss/scopeguard) | 1.1.0 | bluss | Apache-2.0 or MIT | | ||
| [smallvec](https://github.com/servo/rust-smallvec) | 1.8.0 | The Servo Project Developers | Apache-2.0 or MIT | | ||
| [spin](https://github.com/mvdnes/spin-rs.git) | 0.9.2 | [Mathijs van de Nes](mailto:[email protected]), [John Ericson](mailto:[email protected]), and [Joshua Barretto](mailto:[email protected]) | MIT | | ||
| [svg](https://github.com/bodoni/svg) | 0.10.0 | [Adam Bryant](mailto:[email protected]), [Felix Schütt](mailto:[email protected]), [GeoffreyY](mailto:[email protected]), [Gijs Burghoorn](mailto:[email protected]), [Ivan Ukhov](mailto:[email protected]), [Mike Wilkerson](mailto:[email protected]), [Nicolas Silva](mailto:[email protected]), [Nor Khasyatillah](mailto:[email protected]), [OCTronics](mailto:[email protected]), [Patrick Chieppe](mailto:[email protected]), [Will Nelson](mailto:[email protected]), [Xander Rudelis](mailto:[email protected]), [e-matteson](mailto:[email protected]), and [kmkzt](mailto:[email protected]) | Apache-2.0 or MIT | | ||
| [tempfile](https://github.com/Stebalien/tempfile) | 3.3.0 | [Steven Allen](mailto:[email protected]), The Rust Project Developers, [Ashley Mannix](mailto:[email protected]), and [Jason White](mailto:[email protected]) | Apache-2.0 or MIT | | ||
| [wasi](https://github.com/bytecodealliance/wasi) | 0.10.2+wasi-snapshot-preview1 | The Cranelift Project Developers | Apache-2.0, Apache-2.0 WITH LLVM-exception, or MIT | | ||
| [winapi](https://github.com/retep998/winapi-rs) | 0.3.9 | [Peter Atashian](mailto:[email protected]) | Apache-2.0 or MIT | | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
[package] | ||
name = "yesvgmap" | ||
version = "0.2.5" | ||
version = "0.3.0" | ||
license = "WTFPL" | ||
authors = ["Josh Stoik <[email protected]>"] | ||
edition = "2021" | ||
|
@@ -82,11 +82,9 @@ description = "Any number of files and directories to crawl and crunch." | |
|
||
[dependencies] | ||
argyle = "0.5.*" | ||
dactyl = "0.2.*" | ||
dowser = "0.3.*" | ||
fyi_msg = "0.9.*" | ||
once_cell = "1.9.*" | ||
regex = "1.5.*" | ||
svg = "0.10.*" | ||
write_atomic = "0.2.*" | ||
|
||
[profile.release] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
/*! | ||
# Yesvgmap: Errors | ||
*/ | ||
|
||
use argyle::ArgyleError; | ||
use std::{ | ||
error::Error, | ||
fmt, | ||
path::PathBuf, | ||
}; | ||
|
||
|
||
|
||
#[derive(Debug, Clone)] | ||
/// # Error type. | ||
pub(super) enum SvgError { | ||
/// # Argyle passthrough. | ||
Argue(ArgyleError), | ||
|
||
/// # Duplicate entry. | ||
Duplicate, | ||
|
||
/// # No SVGs. | ||
NoSvgs, | ||
|
||
/// # Parse. | ||
Parse(PathBuf), | ||
|
||
/// # SVG Read. | ||
Read(PathBuf), | ||
|
||
/// # Viewbox. | ||
Viewbox(PathBuf), | ||
|
||
/// # Write. | ||
Write, | ||
} | ||
|
||
impl Error for SvgError {} | ||
|
||
impl fmt::Display for SvgError { | ||
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { | ||
match self { | ||
Self::Parse(p) => write!(f, "Unable to parse: {:?}.", p), | ||
Self::Read(p) => write!(f, "Unreadable: {:?}.", p), | ||
Self::Viewbox(p) => write!(f, "Missing viewBox: {:?}", p), | ||
_ => f.write_str(self.as_str()), | ||
} | ||
} | ||
} | ||
|
||
impl From<ArgyleError> for SvgError { | ||
#[inline] | ||
fn from(err: ArgyleError) -> Self { Self::Argue(err) } | ||
} | ||
|
||
impl SvgError { | ||
/// # As Str. | ||
pub(super) const fn as_str(&self) -> &'static str { | ||
match self { | ||
Self::Argue(e) => e.as_str(), | ||
Self::Duplicate => "Normalized file names must be unique.", | ||
Self::NoSvgs => "No SVGs were found.", | ||
Self::Write => "Unable to save the SVG map.", | ||
_ => "", | ||
} | ||
} | ||
} |
Oops, something went wrong.