caesura 0.11.2

An all-in-one command line tool to **transcode FLAC** audio files and **upload to gazelle** based indexers/trackers.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
use crate::options::Options;

pub struct ValueProvider;

impl ValueProvider {
    #[allow(clippy::expect_fun_call)]
    pub fn get<TOptions: Options, TValue, F>(options: &TOptions, selector: F) -> TValue
    where
        F: FnOnce(&TOptions) -> Option<TValue>,
    {
        selector(options)
            .expect(format!("{} should have all values set", TOptions::get_name()).as_str())
    }
}