Skip to content

Commit

Permalink
ci: remove cron schedule for deps.yml (#808)
Browse files Browse the repository at this point in the history
* ci: remove cron schedule for deps.yml

* chore: allow Unicode-3.0

* chore: update

* chore: clippy
  • Loading branch information
DaniPopes authored Nov 22, 2024
1 parent 732b6c5 commit 58a6785
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 13 deletions.
1 change: 0 additions & 1 deletion .github/workflows/deps.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ on:
branches: [main]
pull_request:
branches: [main]
schedule: [cron: "00 00 * * *"]

jobs:
cargo-deny:
Expand Down
4 changes: 2 additions & 2 deletions crates/sol-macro-expander/src/expand/var_def.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ pub(super) fn var_as_function(
cx: &ExpCtxt<'_>,
var_def: &VariableDefinition,
) -> Result<Option<ItemFunction>> {
// only expand public or external state variables
if !var_def.attributes.visibility().map_or(false, |v| v.is_public() || v.is_external()) {
// Only expand public or external state variables.
if !var_def.attributes.visibility().is_some_and(|v| v.is_public() || v.is_external()) {
return Ok(None);
}

Expand Down
4 changes: 2 additions & 2 deletions crates/syn-solidity/src/attribute/function.rs
Original file line number Diff line number Diff line change
Expand Up @@ -290,15 +290,15 @@ impl FunctionAttribute {

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

#[inline]
pub fn is_modifier(&self, path: Option<&SolPath>) -> bool {
self.modifier().map_or(false, |m| match path {
self.modifier().is_some_and(|m| match path {
Some(path) => m.name == *path,
None => true,
})
Expand Down
2 changes: 1 addition & 1 deletion crates/syn-solidity/src/attribute/variable.rs
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ impl VariableAttribute {

#[inline]
pub fn is_override(&self, path: Option<&SolPath>) -> bool {
self.r#override().map_or(false, |o| match path {
self.r#override().is_some_and(|o| match path {
Some(path) => o.paths.iter().any(|p| p == path),
None => true,
})
Expand Down
2 changes: 1 addition & 1 deletion crates/syn-solidity/src/type/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -359,7 +359,7 @@ impl Type {
f.arguments.iter().any(|arg| arg.ty.has_custom())
|| f.returns
.as_ref()
.map_or(false, |ret| ret.returns.iter().any(|arg| arg.ty.has_custom()))
.is_some_and(|ret| ret.returns.iter().any(|arg| arg.ty.has_custom()))
}
Self::Mapping(m) => m.key.has_custom() || m.value.has_custom(),
Self::Bool(_)
Expand Down
2 changes: 1 addition & 1 deletion crates/syn-solidity/src/yul/stmt/var_decl.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ impl Parse for YulVarDecl {
};

if vars.len() > 1
&& init_value.as_ref().map_or(false, |(_, expr)| !matches!(expr, YulExpr::Call(_)))
&& init_value.as_ref().is_some_and(|(_, expr)| !matches!(expr, YulExpr::Call(_)))
{
return Err(
input.error("Multiple variables can only be initialized by a function call")
Expand Down
8 changes: 3 additions & 5 deletions deny.toml
Original file line number Diff line number Diff line change
@@ -1,17 +1,14 @@
[advisories]
vulnerability = "deny"
unmaintained = "warn"
unsound = "warn"
version = 2
yanked = "warn"
notice = "warn"
ignore = []

[bans]
multiple-versions = "warn"
wildcards = "deny"
highlight = "all"

[licenses]
unlicensed = "deny"
confidence-threshold = 0.9
# copyleft = "deny"

Expand All @@ -24,6 +21,7 @@ allow = [
"BSD-3-Clause",
"ISC",
"Unicode-DFS-2016",
"Unicode-3.0",
"Unlicense",
"MPL-2.0",
"Zlib",
Expand Down

0 comments on commit 58a6785

Please sign in to comment.