93 lines
6.5 KiB
Plaintext
93 lines
6.5 KiB
Plaintext
cargo : Checking rolegram v0.1.0 (C:\Users\macro\D
|
|
ocuments\workspace\self\rolegram\src-tauri)
|
|
所在位置 行:1 字符: 66
|
|
+ ... self\rolegram\src-tauri"; cargo check 2>&1 > bui
|
|
ld_errors.txt; Get-Co ...
|
|
+ ~~~~~~~~~~~~~~~~~~~~~~
|
|
~~~~~~~~~~~~~
|
|
+ CategoryInfo : NotSpecified: ( Chec
|
|
king ro...gram\src-tauri):String) [], RemoteExcep
|
|
tion
|
|
+ FullyQualifiedErrorId : NativeCommandError
|
|
|
|
error: future cannot be sent between threads safely
|
|
--> src\handlers\tauri_handlers.rs:18:1
|
|
|
|
|
18 | #[tauri::command]
|
|
| ^^^^^^^^^^^^^^^^^ future returned by `send_mes
|
|
sage` is not `Send`
|
|
|
|
|
::: src\lib.rs:61:25
|
|
|
|
|
61 | .invoke_handler(tauri::generate_handle
|
|
r![
|
|
| _________________________-
|
|
62 | | handlers::tauri_handlers::send_mes
|
|
sage,
|
|
63 | | handlers::tauri_handlers::get_supp
|
|
orted_message_types
|
|
64 | | ])
|
|
| |_________- in this macro invocation
|
|
|
|
|
= help: within `impl Future<Output = Result<std::s
|
|
tring::String, std::string::String>>`, the trait `Send
|
|
` is not implemented for `std::sync::RwLockReadGuard<'
|
|
_, HashMap<std::string::String, Arc<dyn MessagePlugin>
|
|
>>`
|
|
note: future is not `Send` as this value is used acros
|
|
s an await
|
|
--> src\router\message_router.rs:44:41
|
|
|
|
|
37 | let plugins = self.plugins.read().map_er
|
|
r(|_| "Failed to read plugins")?;
|
|
| ------- has type `std::sync::RwLockR
|
|
eadGuard<'_, HashMap<std::string::String, Arc<dyn Mess
|
|
agePlugin>>>` which is not `Send`
|
|
...
|
|
44 | sender.send(processed_data).await?;
|
|
| ^^^^^ aw
|
|
ait occurs here, with `plugins` maybe used later
|
|
note: required by a bound in `ResultFutureTag::future`
|
|
--> C:\Users\macro\.cargo\registry\src\rsproxy.cn-e
|
|
3de039b2554c837\tauri-2.10.3\src\ipc\command.rs:314:42
|
|
|
|
|
310 | pub async fn future<T, E, F>(self, value: F)
|
|
-> Result<InvokeResponseBody, InvokeError>
|
|
| ------ required by a bound in t
|
|
his associated function
|
|
...
|
|
314 | F: Future<Output = Result<T, E>> + Send,
|
|
| ^^^^ re
|
|
quired by this bound in `ResultFutureTag::future`
|
|
= note: this error originates in the macro `handle
|
|
rs::tauri_handlers::__cmd__send_message` which comes f
|
|
rom the expansion of the macro `tauri::generate_handle
|
|
r` (in Nightly builds, run with -Z macro-backtrace for
|
|
more info)
|
|
|
|
warning: variable does not need to be mutable
|
|
--> src\router\message_router.rs:79:31
|
|
|
|
|
79 | pub fn register_plugin<P>(mut self, plugin: P
|
|
) -> Self
|
|
| ----^^^^
|
|
| |
|
|
| help: remove this `
|
|
mut`
|
|
|
|
|
= note: `#[warn(unused_mut)]` (part of `#[warn(unus
|
|
ed)]`) on by default
|
|
|
|
warning: variable does not need to be mutable
|
|
--> src\router\message_router.rs:92:26
|
|
|
|
|
92 | pub fn on_message<F>(mut self, callback: F) -
|
|
> Self
|
|
| ----^^^^
|
|
| |
|
|
| help: remove this `mut`
|
|
|
|
warning: `rolegram` (lib) generated 2 warnings
|
|
error: could not compile `rolegram` (lib) due to 2 pre
|
|
vious errors; 2 warnings emitted
|