Skip to content

Commit

Permalink
Merge pull request #116 from aumetra/update-crates
Browse files Browse the repository at this point in the history
Update crates and UI test
  • Loading branch information
jprochazk authored Jun 16, 2024
2 parents d15689a + 6b77f0f commit 0c62b91
Show file tree
Hide file tree
Showing 9 changed files with 19 additions and 17 deletions.
1 change: 1 addition & 0 deletions deny.toml
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ unlicensed = "deny"
allow = [
"MIT",
"Apache-2.0",
"Unicode-3.0",
"Unicode-DFS-2016",
"Unlicense",
"BSD-3-Clause",
Expand Down
4 changes: 2 additions & 2 deletions garde/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -50,15 +50,15 @@ regex = { version = "1", default-features = false, features = [
"std",
], optional = true }
once_cell = { version = "1", optional = true }
idna = { version = "0.3", optional = true }
idna = { version = "1", optional = true }

[target.'cfg(all(target_arch = "wasm32", target_os = "unknown"))'.dependencies]
js-sys = { version = "0.3", optional = true }

[dev-dependencies]
trybuild = { version = "1.0" }
insta = { version = "1.29" }
owo-colors = { version = "3.5.0" }
owo-colors = { version = "4" }
glob = "0.3.1"
serde_json = { version = "1.0.112", features = ["preserve_order"] }

Expand Down
4 changes: 3 additions & 1 deletion garde/src/rules/email.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
use std::fmt::Display;
use std::str::FromStr;

use idna::AsciiDenyList;

use super::pattern::Matcher;
use super::AsStr;
use crate::error::Error;
Expand Down Expand Up @@ -121,7 +123,7 @@ pub fn parse_email(s: &str) -> Result<(), InvalidEmail> {

#[cfg(feature = "email-idna")]
{
match idna::domain_to_ascii(domain) {
match idna::domain_to_ascii_cow(domain.as_bytes(), AsciiDenyList::URL) {
Ok(domain) => {
if !is_valid_domain(&domain) {
return Err(InvalidEmail::InvalidDomain);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ error[E0277]: the trait bound `&str: Matcher` is not satisfied
| ^^^ the trait `Matcher` is not implemented for `&str`
|
= help: the following other types implement trait `Matcher`:
once_cell::sync::Lazy<T>
Regex
once_cell::sync::Lazy<T>
note: required by a bound in `garde::rules::pattern::apply`
--> src/rules/pattern.rs
|
Expand Down
4 changes: 2 additions & 2 deletions integrations/axum_garde/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,10 @@ garde = { version = "0.19.0", path = "../../garde", features = [
"derive",
] }
axum = { version = "0.7", features = ["default", "macros"] }
axum-test = { version = "14.1" }
axum-test = { version = "14.10" }
tokio = { version = "1.28", features = ["full"] }
prost = { version = "0.12" }
rstest = { version = "0.18" }
rstest = { version = "0.21" }
speculoos = { version = "0.11" }

[[example]]
Expand Down
1 change: 0 additions & 1 deletion integrations/axum_garde/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
clippy::needless_borrow,
clippy::match_wildcard_for_single_variants,
clippy::if_let_mutex,
clippy::mismatched_target_os,
clippy::await_holding_lock,
clippy::match_on_vec_items,
clippy::imprecise_flops,
Expand Down
12 changes: 6 additions & 6 deletions xtask/Cargo.lock

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

2 changes: 1 addition & 1 deletion xtask/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@ anyhow = { version = "1.0.72", features = ["backtrace"] }
argp = "0.3"
glob = { version = "0.3.1", default-features = false }
semver = "1.0.18"
toml_edit = { version = "0.19.14", features = ["perf"] }
toml_edit = { version = "0.22.14", features = ["perf"] }

[workspace]
6 changes: 3 additions & 3 deletions xtask/src/crates.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@ use std::fs;
use std::path::{Path, PathBuf};

use semver::{BuildMetadata, Prerelease};
use toml_edit::Document;
use toml_edit::DocumentMut;

use crate::Result;

pub struct Crate {
path: PathBuf,
doc: Document,
doc: DocumentMut,
}

impl Crate {
Expand All @@ -22,7 +22,7 @@ impl Crate {
pub fn from_str(path: impl AsRef<Path>, source: &str) -> Result<Self> {
Ok(Self {
path: path.as_ref().to_path_buf(),
doc: source.parse::<Document>()?,
doc: source.parse::<DocumentMut>()?,
})
}

Expand Down

0 comments on commit 0c62b91

Please sign in to comment.