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

Take writer by value #125

Merged
merged 1 commit into from Jul 15, 2023
Merged

Take writer by value #125

merged 1 commit into from Jul 15, 2023

Conversation

kornelski
Copy link
Contributor

io::Write is implemented for all &mut io::Write, so the &mut part doesn't have to be explicit.

Fixes #111

@kornelski
Copy link
Contributor Author

kornelski commented Mar 22, 2023

It is a small semver-major incompatibility. In one place I've used an overcomplicated where W: ?Sized, for<'a> &'a mut W: Write bound, which caused an odd error "overflow evaluating the requirement &mut Vec<u8>: std::io::Write".

But simple &mut dyn Write, &mut impl Write, &mut W where W: Write all work fine.

@kornelski
Copy link
Contributor Author

@kaj ping

@kaj
Copy link
Owner

kaj commented Jul 15, 2023

Hm. I have gone from simple to complex to more complex and to slightly simpler again on this type ... But you are probably write, back to the simplest possible is the way to go.

@kaj kaj merged commit 290ad9e into kaj:master Jul 15, 2023
@kaj
Copy link
Owner

kaj commented Jul 15, 2023

Thanks for the contribution!

kaj added a commit that referenced this pull request Jul 22, 2023
* Added a check that no more than one of the http-types, mime02, or
  mime03 features are enabled (PR #124).  Thanks @rustafarian-dev.
* Changed the writer type from `W: &mut Write` to just `W: Write` (PR #125).
  Thanks @kornelski!
* Fixed handling of `MULTI_WORD_CONSTANTS` in templates (Issue #129, PR #130).
  Thanks @wezm!
* More ways to create a working rust symbol name from a "strange"
  static file name.  Illegal characters are replaced by `_`, and if
  the file name starts with a number it is prefixed with `n` (Issue
  #82, PR #132).  Thanks @Aedius for reporting!
* Fixed more clippy lints (PR #123, #127).  Thanks @vbrandl!
* Updated `rsass` to 0.28.0 and `itertools` to 0.11.0.
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.

dyn Write support removed?
2 participants