Your browser sucks, JavaScript disabled! Gunnar's console needs JavaScript and WebAssembly. Git over SSH on port 2222 does not.

nordisk/holger

server/repository/file-rust/examples/get_path.rs

use repository_file_rust::RustRepoFile;

type RPath<'a> = (&'a str, &'a str, &'a str);

fn main() {
    println!("path: {:?}", RustRepoFile::sparse_path("a"));
    println!("path: {:?}", RustRepoFile::sparse_path("ab"));
    println!("path: {:?}", RustRepoFile::sparse_path("abc"));
    println!("path: {:?}", RustRepoFile::sparse_path("tokio"));

    let tuple_path: RPath = RustRepoFile::sparse_path("tokio").into();
    println!("Tuple: {:?}", tuple_path);
}