Git Product home page Git Product logo

Comments (5)

anko avatar anko commented on August 29, 2024 1

I think the constant should exist. Name collision is unavoidable, and solved with crate namespacing.

Anyone who wants to annoy all future maintainers of their software with use x11::*; presumably knows what they're doing, and deserves the clear and helpful compiler errors they'll get.

from x11-rs.

 avatar commented on August 29, 2024

None was in early versions, but when I was porting others' projects to use x11-rs, it was causing problems with glob imports, causing x11::None to override std::option::None. It is explicitly defined as zero in the X11 specs, so it's okay to compare to zero instead of None. The implementation will never change it to something crazy like ((XID)-1).

from x11-rs.

fuine avatar fuine commented on August 29, 2024

Ah ok, thanks. I guess i will stick to the 0.

from x11-rs.

 avatar commented on August 29, 2024

Maybe I'll throw it back in when version 3 is ready. Glob imports are evil anyway.

from x11-rs.

AltF02 avatar AltF02 commented on August 29, 2024

As @dagit mentioned, I do think having maybe a XNone constant could be helpful. Possibly to be added to xlib.rs. Does require documentation. Which this library is currently completely missing. As the old old maintainer mentioned, possibly something for v3. Afaik he was planning to go for a similar approach as x11rb does atm

from x11-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.