mirror of
https://github.com/stefanoamorelli/crabrl.git
synced 2026-04-18 07:10:42 +00:00
fix: update examples to match API
- Fix parse method name to parse_bytes - Fix fact iteration pattern - Simplify validation example
This commit is contained in:
@@ -19,7 +19,8 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||
println!(" Units: {}", doc.units.len());
|
||||
|
||||
// Show first 5 facts
|
||||
for fact in doc.facts.iter().take(5) {
|
||||
let facts_vec: Vec<_> = doc.facts.clone().into();
|
||||
for fact in facts_vec.iter().take(5) {
|
||||
println!(" - {}: {}", fact.name, fact.value);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user