Skip to content

README example does not compile #378

Description

@gagath

The example in the README fails to compile with the following errors and warnings:

warning: unused import: `std::fs`
  --> src/main.rs:15:5
   |
15 | use std::fs;
   |     ^^^^^^^
   |
   = note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default

warning: unused import: `std::path::Path`
  --> src/main.rs:16:5
   |
16 | use std::path::Path;
   |     ^^^^^^^^^^^^^^^

error[E0433]: cannot find module or crate `byteorder` in this scope
  --> src/main.rs:25:31
   |
25 | ...Str, U32<byteorder::NativeEndian>> = env.create_database(&mut wtxn, None)?;
   |             ^^^^^^^^^ use of unresolved module or unlinked crate `byteorder`
   |
   = help: if you wanted to use a crate named `byteorder`, use `cargo add byteorder` to add it to your `Cargo.toml`

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions