Coder Social home page Coder Social logo

Comments (3)

antonok-edm avatar antonok-edm commented on June 28, 2024 2

@ArniDagur I agree, better methods of error logging sound like a great idea and I'd be happy to improve adblock-rust in this regard.

As it stands, many of the Engine APIs either return nothing, or are builder-style methods that return another mutable reference to self. I think the best way to go about this would be:

  • For methods that return nothing, return a Result<(), E> instead, where E is a custom error type denoting the problems that can occur for that particular method.
  • For builder-style methods, it'd be impractical to return a Result. I'm not sure how commonly these are actually chained together, but I'm not opposed to doing away with the builder-style altogether. Then these can fit in with the first case as well. The builder-style methods are gone as of v0.3.

Does that sound reasonable?

from adblock-rust.

ArniDagur avatar ArniDagur commented on June 28, 2024 1

@AndriusA Hey! I have time over the weekend to work on this. Just tell me how you want it to be done, if at all.

from adblock-rust.

antonok-edm avatar antonok-edm commented on June 28, 2024 1

Just pulled out the last few eprintln cases with 88c1a6b, so I'll consider this fixed!

from adblock-rust.

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.