You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jul 25, 2024. It is now read-only.
Quite possibly I don't understand something, I have just begun my Rust adventure ;) and right away started playing with libraries that are touching filesystems but this seems to be straightforward yet does not work as I imagine it should.
Simple code:
extern crate libzfs;
use libzfs::{Libzfs};
fn main() {
let mut libzfs = Libzfs::new();
let pools = libzfs.get_imported_pools().unwrap();
for pool in pools {
let datasets = pool.datasets().unwrap();
for dataset in datasets {
println!("{:?}", dataset.name());
}
}
}
Interestingly I am able to access not listed datasets by calling dataset_by_name() for example libzfs.dataset_by_name("d1226526151549b6a14a18c6217f17bf/home/core").unwrap() works fine and returns correct data.
The text was updated successfully, but these errors were encountered:
Quite possibly I don't understand something, I have just begun my Rust adventure ;) and right away started playing with libraries that are touching filesystems but this seems to be straightforward yet does not work as I imagine it should.
Simple code:
Result:
Expected:
Used:
Interestingly I am able to access not listed datasets by calling
dataset_by_name()
for examplelibzfs.dataset_by_name("d1226526151549b6a14a18c6217f17bf/home/core").unwrap()
works fine and returns correct data.The text was updated successfully, but these errors were encountered: