Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

修复枚举字段命名错误 #47

Merged
merged 2 commits into from
Feb 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
[workspace]
resolver = "2"
members = [
"proc_qq",
"proc_qq_codegen",
Expand Down
4 changes: 2 additions & 2 deletions proc_qq/src/handler/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@

enum MapResult<'a> {
None,
Process(&'a str, &'a str),

Check warning on line 25 in proc_qq/src/handler/mod.rs

View workflow job for this annotation

GitHub Actions / Test features (--no-default-features)

fields `0` and `1` are never read

Check warning on line 25 in proc_qq/src/handler/mod.rs

View workflow job for this annotation

GitHub Actions / Test features (--all-features)

fields `0` and `1` are never read

Check warning on line 25 in proc_qq/src/handler/mod.rs

View workflow job for this annotation

GitHub Actions / Test platforms (ubuntu-latest, x86_64-unknown-linux-gnu)

fields `0` and `1` are never read

Check warning on line 25 in proc_qq/src/handler/mod.rs

View workflow job for this annotation

GitHub Actions / Test platforms (macos-latest, x86_64-apple-darwin)

fields `0` and `1` are never read

Check warning on line 25 in proc_qq/src/handler/mod.rs

View workflow job for this annotation

GitHub Actions / Test android

fields `0` and `1` are never read

Check warning on line 25 in proc_qq/src/handler/mod.rs

View workflow job for this annotation

GitHub Actions / Test platforms (windows-latest, x86_64-pc-windows-msvc)

fields `0` and `1` are never read

Check warning on line 25 in proc_qq/src/handler/mod.rs

View workflow job for this annotation

GitHub Actions / Test features (--no-default-features)

fields `0` and `1` are never read

Check warning on line 25 in proc_qq/src/handler/mod.rs

View workflow job for this annotation

GitHub Actions / Test features (--all-features)

fields `0` and `1` are never read

Check warning on line 25 in proc_qq/src/handler/mod.rs

View workflow job for this annotation

GitHub Actions / Test platforms (ubuntu-latest, x86_64-unknown-linux-gnu)

fields `0` and `1` are never read

Check warning on line 25 in proc_qq/src/handler/mod.rs

View workflow job for this annotation

GitHub Actions / Test android

fields `0` and `1` are never read

Check warning on line 25 in proc_qq/src/handler/mod.rs

View workflow job for this annotation

GitHub Actions / Test platforms (macos-latest, x86_64-apple-darwin)

fields `0` and `1` are never read

Check warning on line 25 in proc_qq/src/handler/mod.rs

View workflow job for this annotation

GitHub Actions / Test platforms (windows-latest, x86_64-pc-windows-msvc)

fields `0` and `1` are never read
Exception(&'a str, &'a str),

Check warning on line 26 in proc_qq/src/handler/mod.rs

View workflow job for this annotation

GitHub Actions / Test features (--no-default-features)

fields `0` and `1` are never read

Check warning on line 26 in proc_qq/src/handler/mod.rs

View workflow job for this annotation

GitHub Actions / Test features (--all-features)

fields `0` and `1` are never read

Check warning on line 26 in proc_qq/src/handler/mod.rs

View workflow job for this annotation

GitHub Actions / Test platforms (ubuntu-latest, x86_64-unknown-linux-gnu)

fields `0` and `1` are never read

Check warning on line 26 in proc_qq/src/handler/mod.rs

View workflow job for this annotation

GitHub Actions / Test platforms (macos-latest, x86_64-apple-darwin)

fields `0` and `1` are never read

Check warning on line 26 in proc_qq/src/handler/mod.rs

View workflow job for this annotation

GitHub Actions / Test android

fields `0` and `1` are never read

Check warning on line 26 in proc_qq/src/handler/mod.rs

View workflow job for this annotation

GitHub Actions / Test platforms (windows-latest, x86_64-pc-windows-msvc)

fields `0` and `1` are never read

Check warning on line 26 in proc_qq/src/handler/mod.rs

View workflow job for this annotation

GitHub Actions / Test features (--no-default-features)

fields `0` and `1` are never read

Check warning on line 26 in proc_qq/src/handler/mod.rs

View workflow job for this annotation

GitHub Actions / Test features (--all-features)

fields `0` and `1` are never read

Check warning on line 26 in proc_qq/src/handler/mod.rs

View workflow job for this annotation

GitHub Actions / Test platforms (ubuntu-latest, x86_64-unknown-linux-gnu)

fields `0` and `1` are never read

Check warning on line 26 in proc_qq/src/handler/mod.rs

View workflow job for this annotation

GitHub Actions / Test android

fields `0` and `1` are never read

Check warning on line 26 in proc_qq/src/handler/mod.rs

View workflow job for this annotation

GitHub Actions / Test platforms (macos-latest, x86_64-apple-darwin)

fields `0` and `1` are never read

Check warning on line 26 in proc_qq/src/handler/mod.rs

View workflow job for this annotation

GitHub Actions / Test platforms (windows-latest, x86_64-pc-windows-msvc)

fields `0` and `1` are never read
}

macro_rules! map_result {
Expand Down Expand Up @@ -377,8 +377,8 @@
match map_handlers!(
&self,
&DisconnectedAndOfflineEvent {},
ModuleEventProcess::DisconnectAndOffline,
ResultProcess::DisconnectAndOffline,
ModuleEventProcess::DisconnectedAndOffline,
ResultProcess::DisconnectedAndOffline,
) {
MapResult::Exception(_, _) => Err(anyhow::Error::msg("err")),
_ => Ok(()),
Expand Down
2 changes: 1 addition & 1 deletion proc_qq/src/handler/processes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ pub enum ModuleEventProcess {
LoginEvent(Box<dyn LoginEventProcess>),
Message(Box<dyn MessageEventProcess>),
ConnectedAndOnline(Box<dyn ConnectedAndOnlineEventProcess>),
DisconnectAndOffline(Box<dyn DisconnectedAndOfflineEventProcess>),
DisconnectedAndOffline(Box<dyn DisconnectedAndOfflineEventProcess>),

GroupDisband(Box<dyn GroupDisbandEventProcess>),
MemberPermissionChange(Box<dyn MemberPermissionChangeEventProcess>),
Expand Down
2 changes: 1 addition & 1 deletion proc_qq/src/handler/results.rs
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ pub enum ResultProcess {
LoginEvent(Box<dyn LoginResultHandler>),
Message(Box<dyn MessageResultHandler>),
ConnectedAndOnline(Box<dyn ConnectedAndOnlineResultHandler>),
DisconnectAndOffline(Box<dyn DisconnectedAndOfflineResultHandler>),
DisconnectedAndOffline(Box<dyn DisconnectedAndOfflineResultHandler>),

GroupDisband(Box<dyn GroupDisbandResultHandler>),
MemberPermissionChange(Box<dyn MemberPermissionChangeResultHandler>),
Expand Down
2 changes: 1 addition & 1 deletion proc_qq_template/src/database/redis.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ where
.unwrap()
.get_async_connection()
.await?
.set_ex(key, value, expire_seconds)
.set_ex(key, value, expire_seconds as u64)
.await
}

Expand Down
Loading