Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make use of Rust 1.63 features #863

Merged
merged 2 commits into from
Jul 30, 2023
Merged

Make use of Rust 1.63 features #863

merged 2 commits into from
Jul 30, 2023

Conversation

psychon
Copy link
Owner

@psychon psychon commented Jul 30, 2023

Now that #815 bumped the MSRV, we can clean up some things that were tracked in #538.

psychon added 2 commits July 30, 2023 08:50
Rust 1.60 added the escape_ascii() function on slices of u8. This
produces an iterator with items u8 that provides escapement in the style
of std::ascii::escape_default(). The returned iterator implements
Display, thus we can just pass it directly to write!() to get the
resulting escaped string.

The above allows to simplify some hand-written version doing the same.

Signed-off-by: Uli Schlachter <[email protected]>
Commit 72d70aa added a fallback for older Rust versions that
did not yet have cfg(target_has_atomic), which was stabilised in Rust
1.61. Now that our MSRV is above that, we can remove the extra code.

Signed-off-by: Uli Schlachter <[email protected]>
@codecov
Copy link

codecov bot commented Jul 30, 2023

Codecov Report

Patch coverage has no change and project coverage change: -0.03% ⚠️

Comparison is base (16a3209) 12.73% compared to head (dac5e1c) 12.70%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #863      +/-   ##
==========================================
- Coverage   12.73%   12.70%   -0.03%     
==========================================
  Files         189      188       -1     
  Lines      137987   137938      -49     
==========================================
- Hits        17572    17528      -44     
+ Misses     120415   120410       -5     
Flag Coverage Δ
tests 12.70% <0.00%> (-0.03%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Changed Coverage Δ
x11rb/src/errors.rs 8.45% <0.00%> (+0.45%) ⬆️

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@mergify mergify bot merged commit 7053aca into master Jul 30, 2023
@mergify mergify bot deleted the msrv-cleanup branch July 30, 2023 10:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants