Skip to content

Commit 58a6785

Browse files
authored
ci: remove cron schedule for deps.yml (#808)
* ci: remove cron schedule for deps.yml * chore: allow Unicode-3.0 * chore: update * chore: clippy
1 parent 732b6c5 commit 58a6785

File tree

7 files changed

+10
-13
lines changed

7 files changed

+10
-13
lines changed

.github/workflows/deps.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ on:
55
branches: [main]
66
pull_request:
77
branches: [main]
8-
schedule: [cron: "00 00 * * *"]
98

109
jobs:
1110
cargo-deny:

crates/sol-macro-expander/src/expand/var_def.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ pub(super) fn var_as_function(
1919
cx: &ExpCtxt<'_>,
2020
var_def: &VariableDefinition,
2121
) -> Result<Option<ItemFunction>> {
22-
// only expand public or external state variables
23-
if !var_def.attributes.visibility().map_or(false, |v| v.is_public() || v.is_external()) {
22+
// Only expand public or external state variables.
23+
if !var_def.attributes.visibility().is_some_and(|v| v.is_public() || v.is_external()) {
2424
return Ok(None);
2525
}
2626

crates/syn-solidity/src/attribute/function.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -290,15 +290,15 @@ impl FunctionAttribute {
290290

291291
#[inline]
292292
pub fn is_override(&self, path: Option<&SolPath>) -> bool {
293-
self.r#override().map_or(false, |o| match path {
293+
self.r#override().is_some_and(|o| match path {
294294
Some(path) => o.paths.iter().any(|p| p == path),
295295
None => true,
296296
})
297297
}
298298

299299
#[inline]
300300
pub fn is_modifier(&self, path: Option<&SolPath>) -> bool {
301-
self.modifier().map_or(false, |m| match path {
301+
self.modifier().is_some_and(|m| match path {
302302
Some(path) => m.name == *path,
303303
None => true,
304304
})

crates/syn-solidity/src/attribute/variable.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,7 @@ impl VariableAttribute {
243243

244244
#[inline]
245245
pub fn is_override(&self, path: Option<&SolPath>) -> bool {
246-
self.r#override().map_or(false, |o| match path {
246+
self.r#override().is_some_and(|o| match path {
247247
Some(path) => o.paths.iter().any(|p| p == path),
248248
None => true,
249249
})

crates/syn-solidity/src/type/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -359,7 +359,7 @@ impl Type {
359359
f.arguments.iter().any(|arg| arg.ty.has_custom())
360360
|| f.returns
361361
.as_ref()
362-
.map_or(false, |ret| ret.returns.iter().any(|arg| arg.ty.has_custom()))
362+
.is_some_and(|ret| ret.returns.iter().any(|arg| arg.ty.has_custom()))
363363
}
364364
Self::Mapping(m) => m.key.has_custom() || m.value.has_custom(),
365365
Self::Bool(_)

crates/syn-solidity/src/yul/stmt/var_decl.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ impl Parse for YulVarDecl {
3535
};
3636

3737
if vars.len() > 1
38-
&& init_value.as_ref().map_or(false, |(_, expr)| !matches!(expr, YulExpr::Call(_)))
38+
&& init_value.as_ref().is_some_and(|(_, expr)| !matches!(expr, YulExpr::Call(_)))
3939
{
4040
return Err(
4141
input.error("Multiple variables can only be initialized by a function call")

deny.toml

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,14 @@
11
[advisories]
2-
vulnerability = "deny"
3-
unmaintained = "warn"
4-
unsound = "warn"
2+
version = 2
53
yanked = "warn"
6-
notice = "warn"
4+
ignore = []
75

86
[bans]
97
multiple-versions = "warn"
108
wildcards = "deny"
119
highlight = "all"
1210

1311
[licenses]
14-
unlicensed = "deny"
1512
confidence-threshold = 0.9
1613
# copyleft = "deny"
1714

@@ -24,6 +21,7 @@ allow = [
2421
"BSD-3-Clause",
2522
"ISC",
2623
"Unicode-DFS-2016",
24+
"Unicode-3.0",
2725
"Unlicense",
2826
"MPL-2.0",
2927
"Zlib",

0 commit comments

Comments
 (0)