Created
February 5, 2019 17:02
-
-
Save hfiguiere/ca983802e5de700181f883f497706558 to your computer and use it in GitHub Desktop.
Gio build problem
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[package] | |
name = "rust-sandbox" | |
version = "0.1.0" | |
authors = ["Hubert Figuière <hub@figuiere.net>"] | |
edition = "2018" | |
[dependencies] | |
gio = { git = "https://github.com/gtk-rs/gio" } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
error[E0283]: type annotations required: cannot resolve `_: glib::object::IsA<gio::Cancellable>` | |
--> src/main.rs:10:32 | |
| | |
10 | if let Ok(fileinfo) = file.query_info("*", gio::FileQueryInfoFlags::NONE, None) { | |
| ^^^^^^^^^^ | |
error: aborting due to previous error | |
For more information about this error, try `rustc --explain E0283`. | |
error: Could not compile `rust-sandbox`. | |
To learn more, run the command again with --verbose. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
extern crate gio; | |
use std::path::Path; | |
use gio::prelude::*; | |
fn main() { | |
let path = Path::new("/tmp/foo"); | |
let file = gio::File::new_for_path(path); | |
if let Ok(fileinfo) = file.query_info("*", gio::FileQueryInfoFlags::NONE, None) { | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment