Comments (4)
Wayy back when I started x11-rs, I figured it would be best to start with minimal derive
s because it's more practical to add new ones than to remove any that are unnecessary. Having Debug
would definitely be nice, especially for error structs such as XErrorEvent
, and I don't see any problems with it. I'd add it myself, but with my school load these days, I haven't had much time for this or any of my programming projects.
from x11-rs.
I'm in quite a similar situation myself, but yeah I'd still be willing to spend some time on it and make a PR then. It looks more time-consuming than actually hard, at least for Debug
.
In short, I'd be in to make as many structs as possible derive Debug
, Eq
and PartialEq
, but NOT Default
, Hash
, Ord
, PartialOrd
, Copy
and Clone
, as there's practically no use case for these (In particular Copy
and Clone
would be dishonest most of the time because of pointers etc).
Even then, these could be added later on a case-by-case basis.
from x11-rs.
I noticed this too, having Debug
derived would by really helpful. Deriving PartialEq
/ Eq
should be safe for any struct that doesn't contain pointers.
Could also implement Debug for XEvent
, since it's basically a sum type. Just have to manually use the discriminant.
from x11-rs.
I'd just like to correct my earlier claim and point out that sadly, I'm not actually going to have the time to make a fork and fix this, at least not in the next few weeks.
Perhaps it's just a matter of doing a rough "find-and-replace" and then fixing tidbits but I haven't tried.
from x11-rs.
Related Issues (20)
- x11 vs x11-dl? HOT 3
- undefined reference to `XOpenDisplay' HOT 1
- Debug implementation for XEvent is unsound
- XCreateIC returns null incorrectly but only if another crate (tempfile) is present HOT 1
- XshmSegmentInfo can't be created and its fields should be public
- unify x11/x11-dl crates with dlib HOT 2
- Can't run test_x11 test of my lib-crate even with xlib feature enabled HOT 6
- X11 build dependency failed. HOT 3
- Xcomposite extension HOT 1
- Xdamage extension HOT 1
- How to use the Xfixes extension? HOT 7
- MacOS Support HOT 3
- Can't load shared library on NetBSD
- Missing constant `None`? HOT 3
- Xlib::open takes up a significant amount of the binary HOT 5
- What is the difference between x11 and x11-dl? HOT 2
- Add documentation for the differences between x11 and x11-dl HOT 1
- x11-dl linker error when building musl target on Ubuntu 20.04 with rust 1.72+
- Does x11 support cross-compiling?
- libxext is not linked
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from x11-rs.