ebassi / taglib-rust

TagLib bindings for Rust
MIT License
27 stars 11 forks source link

Remove unused reference to file #7

Closed kalouantonis closed 6 years ago

kalouantonis commented 6 years ago

The Tag and AudioProperties structs were keeping a reference to the file object, making it hard to use them in isolation.

For example doing the following complains about f not living long enough:

taglib::File::new(path).and_then(|f| f.tag())

I also bumped libc to the latest version, if that's a problem I can revert it.

kalouantonis commented 6 years ago

Turns out that the exact example I just gave breaks under the given change with:

pure virtual method called
terminate called without an active exception

I'll see if I can fix it and if not I'll leave it. For now I'll close this PR.