Skip to content

Commit

Permalink
Merge pull request #170 from jontze/chore/prepare-rust-1.81.0-update
Browse files Browse the repository at this point in the history
Upgrade rust version to `1.81.0`
  • Loading branch information
jontze authored Sep 10, 2024
2 parents 181bfb3 + c7f9b86 commit f11fde5
Show file tree
Hide file tree
Showing 7 changed files with 19 additions and 11 deletions.
9 changes: 8 additions & 1 deletion .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,15 @@ updates:
interval: "daily"
commit-message:
prefix: "fix(deps)"
prefix-development: "chore(dev-deps)"
prefix-development: "chore(dev-deps)"
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "daily"
- package-ecosystem: "docker"
directory: /
schedule:
interval: "daily"
commit-message:
prefix: "fix(deps)"
prefix-development: "chore(dev-deps)"
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM lukemathwalker/cargo-chef:latest-rust-1.77-slim-bullseye as build_base
FROM lukemathwalker/cargo-chef:latest-rust-1.81.0-slim-bullseye as build_base

Check warning on line 1 in Dockerfile

View workflow job for this annotation

GitHub Actions / Publish Main image / docker

The 'as' keyword should match the case of the 'from' keyword

FromAsCasing: 'as' and 'FROM' keywords' casing do not match More info: https://docs.docker.com/go/dockerfile/rule/from-as-casing/

Check warning on line 1 in Dockerfile

View workflow job for this annotation

GitHub Actions / Publish dev image / docker

The 'as' keyword should match the case of the 'from' keyword

FromAsCasing: 'as' and 'FROM' keywords' casing do not match More info: https://docs.docker.com/go/dockerfile/rule/from-as-casing/

FROM build_base as planner

Check warning on line 3 in Dockerfile

View workflow job for this annotation

GitHub Actions / Publish Main image / docker

The 'as' keyword should match the case of the 'from' keyword

FromAsCasing: 'as' and 'FROM' keywords' casing do not match More info: https://docs.docker.com/go/dockerfile/rule/from-as-casing/

Check warning on line 3 in Dockerfile

View workflow job for this annotation

GitHub Actions / Publish dev image / docker

The 'as' keyword should match the case of the 'from' keyword

FromAsCasing: 'as' and 'FROM' keywords' casing do not match More info: https://docs.docker.com/go/dockerfile/rule/from-as-casing/
WORKDIR /cadency
Expand Down
2 changes: 1 addition & 1 deletion cadency_codegen/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ license = "MIT"
repository = "https://github.com/jontze/cadency-rs"

[lib]
proc_macro = true
proc-macro = true

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

Expand Down
7 changes: 4 additions & 3 deletions cadency_commands/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ pub use roll::Roll;
mod test {
#[test]
fn impl_commandbaseline_trait_with_macro() {
#[allow(dead_code)]
#[derive(cadency_codegen::CommandBaseline)]
struct Test {}
}
Expand Down Expand Up @@ -140,7 +141,7 @@ mod test {
let test = Test {};
let arguments = test.options();
assert_eq!(arguments.len(), 1);
let argument = arguments.get(0).unwrap();
let argument = arguments.first().unwrap();
assert_eq!(argument.name, "say");
assert_eq!(argument.description, "Word to say");
assert_eq!(argument.kind, CommandOptionType::String);
Expand All @@ -160,7 +161,7 @@ mod test {
"Command should have 1 argument, but had {}",
amount_of_arguments
);
let argument = arguments.get(0).unwrap();
let argument = arguments.first().unwrap();
assert!(argument.required, "Command argument should be required");
}

Expand All @@ -175,7 +176,7 @@ mod test {
let test = Test {};
let arguments = test.options();
assert_eq!(arguments.len(), 2);
let first_argument = arguments.get(0).unwrap();
let first_argument = arguments.first().unwrap();
let second_argument = arguments.get(1).unwrap();
assert_eq!(first_argument.name, "say");
assert_eq!(first_argument.description, "Word to say");
Expand Down
1 change: 1 addition & 0 deletions cadency_commands/src/track_loop.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ use serenity::{async_trait, client::Context, model::application::CommandInteract
required = false,
kind = "Integer"
)]
#[allow(clippy::duplicated_attributes)]
#[argument(
name = "stop",
description = "Cancel looping",
Expand Down
6 changes: 3 additions & 3 deletions cadency_commands/src/urban.rs
Original file line number Diff line number Diff line change
Expand Up @@ -51,14 +51,14 @@ impl Urban {
}
let embed_urban_entry = CreateEmbed::default()
.color(Color::from_rgb(255, 255, 0))
.title(&urban.word.replace(['[', ']'], ""))
.title(urban.word.replace(['[', ']'], ""))
.url(&urban.permalink)
.field(
"Definition",
&urban.definition.replace(['[', ']'], ""),
urban.definition.replace(['[', ']'], ""),
false,
)
.field("Example", &urban.example.replace(['[', ']'], ""), false)
.field("Example", urban.example.replace(['[', ']'], ""), false)
.field(
"Rating",
format!(
Expand Down
3 changes: 1 addition & 2 deletions cadency_core/src/utils/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,7 @@ pub(crate) async fn get_commands(ctx: &Context) -> Vec<Arc<dyn CadencyCommand>>

pub(crate) async fn get_commands_scope(ctx: &Context) -> CommandsScope {
let data_read = ctx.data.read().await;
data_read
*data_read
.get::<CommandsScope>()
.expect("Commands scope missing")
.clone()
}

0 comments on commit f11fde5

Please sign in to comment.