#mismatch type error while reading json files

8 messages · Page 1 of 1 (latest)

remote ibex
#

you're not returning anything from the function

#

i guess you'd want to remove the very last ; from the last line there (or add return in front if you prefer that syntax)

blissful solstice
remote ibex
#

you could change the return value to Value instead of String (and then add .to_owned() at the end

remote ibex
#

no, after that

blissful solstice
#

hm
still dosn't solve the issue
error[E0412]: cannot find type Value in this scope
--> src\main.rs:32:38
|
32 | fn conf(handle: tauri::AppHandle) -> Value {
| ^^^^^ not found in this scope
|
help: consider importing this enum
|
3 + use serde_json::Value;
|

remote ibex
#

do what it says (or change the return value to serde_json::Value if you don't wanna import it)