Giter Club home page Giter Club logo

Comments (4)

jolhoeft avatar jolhoeft commented on August 15, 2024 1

Good catch, the examples on https://nickel-org.github.io/ have gotten out of date. Everything in the examples fixes this by adding unwrap, i.e. server.listen("127.0.0.1:6767").unwrap();. This is ok for examples and cases where that is the last statement in main. Production uses may want more robust logging of the returned Err(e).

I'll keep this issue open until the https://nickel-org.github.io/ pages have been updated.

from nickel.rs.

hedonhermdev avatar hedonhermdev commented on August 15, 2024 1

You could modify your main() function to return a Result<(), Error> and then use server.listen("127.0.0.1:2676")?

from nickel.rs.

JimLynchCodes avatar JimLynchCodes commented on August 15, 2024

Ah, I see. thanks

So am I "losing the errors" when writing it as Some(server.listen("127.0.0.1:6767")); or would it be equivalent in this case server.listen("127.0.0.1:6767").unwrap();?

(or maybe both since returning a plain string can't really fail?)

from nickel.rs.

jolhoeft avatar jolhoeft commented on August 15, 2024

Github pages cleaned up

from nickel.rs.

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.