mirror of
https://github.com/DeterminateSystems/flake-checker.git
synced 2024-09-11 14:25:44 +03:00
Fix README example code
This commit is contained in:
parent
72ad28337f
commit
d7c8501d92
@ -78,10 +78,12 @@ parse-flake-lock = { git = "https://github.com/DeterminateSystems/flake-checker"
|
||||
Here's an example usage:
|
||||
|
||||
```rust
|
||||
use parse_flake_lock::{FlakeLock, ParseFlakeLockError};
|
||||
use std::path::Path;
|
||||
|
||||
fn main() -> Result<(), ParseFlakeLockError> {
|
||||
let flake_lock = FlakeLock::new(&flake_lock_path)?;
|
||||
use parse_flake_lock::{FlakeLock, FlakeLockParseError};
|
||||
|
||||
fn main() -> Result<(), FlakeLockParseError> {
|
||||
let flake_lock = FlakeLock::new(Path::new("flake.lock"))?;
|
||||
println!("flake.lock info:");
|
||||
println!("version: {version}", version=flake_lock.version);
|
||||
println!("root node: {root:?}", root=flake_lock.root);
|
||||
|
Loading…
Reference in New Issue
Block a user