Compile Time Error
felixity1917 opened this issue · 0 comments
felixity1917 commented
At the last thing while compiling. I get this error thrown up.
Compiling dioxus-cli v0.1.4
error[E0061]: this function takes 2 arguments but 1 argument was supplied
--> /home/red/.cargo/registry/src/github.com-1ecc6299db9ec823/dioxus-cli-0.1.4/src/server/mod.rs:35:23
|
35 | let mut watcher = RecommendedWatcher::new(move |_: notify::Result<notify::Event>| {
| _______________________^^^^^^^^^^^^^^^^^^^^^^^-
36 | | if chrono::Local::now().timestamp() > last_update_time
37 | | && builder::build(&watcher_conf).is_ok()
38 | | {
... |
53 | | }
54 | | })
| |______- an argument of type `notify::Config` is missing
|
note: associated function defined here
--> /home/red/.cargo/registry/src/github.com-1ecc6299db9ec823/notify-5.0.0/src/lib.rs:294:8
|
294 | fn new<F: EventHandler>(event_handler: F, config: config::Config) -> Result<Self>
| ^^^
help: provide the argument
|
35 ~ let mut watcher = RecommendedWatcher::new(move |_: notify::Result<notify::Event>| {
36 + if chrono::Local::now().timestamp() > last_update_time
37 + && builder::build(&watcher_conf).is_ok()
38 + {
39 + // change the websocket reload state to true;
40 + // the page will auto-reload.
41 + if watcher_conf
42 + .dioxus_config
43 + .web
44 + .watcher
45 + .reload_html
46 + .unwrap_or(false)
47 + {
48 + let _ = Serve::regen_dev_page(&watcher_conf);
49 + }
50 + println!("watcher send reload");
51 + reload_tx.send("reload".into()).unwrap();
52 + last_update_time = chrono::Local::now().timestamp();
53 + }
54 + }, /* notify::Config */)
|
For more information about this error, try `rustc --explain E0061`.
error: could not compile `dioxus-cli` due to previous error
warning: build failed, waiting for other jobs to finish...
error: failed to compile `dioxus-cli v0.1.4`, intermediate artifacts can be found at `/tmp/cargo-installddWyGi
I don't know Rust so please fix this.