Giter Site home page Giter Site logo

Address type-level crashes about dura HOT 2 CLOSED

tkellogg avatar tkellogg commented on June 20, 2024
Address type-level crashes

from dura.

Comments (2)

tkellogg avatar tkellogg commented on June 20, 2024

I made a little bit of progress in d32a7cf. The logging code in poller.rs now does a decent job of avoiding .unwrap().

from dura.

tkellogg avatar tkellogg commented on June 20, 2024

Current problems:

➜  dura git:(master) rg 'unwrap|expect'
src/main.rs
11:    let dir = std::env::current_dir().unwrap();
14:            if let Some(oid) = snapshots::capture(&dir).unwrap() {
38:    config.set_watch(path.to_str().unwrap().to_string(), WatchConfig::new());

src/log.rs
68:        let path = Config::default_path().parent().unwrap().join(file_name);
78:                eprintln!("Unable to write file {}", path.to_str().unwrap_or("n/a"));

src/snapshots.rs
41:        Some(&branch_commit.as_ref().unwrap_or(&head).tree()?),
58:        &[ branch_commit.as_ref().unwrap_or(&head) ],

src/poller.rs
23:    let repo = path.to_str().unwrap_or("<invalid path>").to_string();

src/config.rs
35:        .expect("Could not find your home directory!")
41:        Self::load_file(Self::default_path().as_path()).unwrap_or(Self::empty())
58:            .unwrap();
61:        serde_json::to_writer(writer, self).unwrap();
62:        println!("Wrote {}", path.to_str().unwrap());

from dura.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.