Sylwester Rąpała

Results 34 comments of Sylwester Rąpała

I have published example template that should provide `project-name` by hooks. Here is the link: https://github.com/xoac/opinionated-rust-template

I agrre with you. This should be warrning not error

I just matched implementation of [`from_static()`](https://github.com/hyperium/http/blob/c28945c6c6f99379b674a1e961a743c7752f2346/src/header/value.rs#L83) that has exactly the same description for ASCII requirements as `from_str` and use the same function (`is_visible_ascii`) to check correctness but panic instead of...

There is [`from_bytes()`](https://github.com/hyperium/http/blob/c28945c6c6f99379b674a1e961a743c7752f2346/src/header/value.rs#L171) function that allow you use non-ascii bytes. And the name of `from_str` is misleading it should be `try_from_str` actually (but it's documented to be replaced in the...

So now the question is a little bit political. Are authors interested to make bytes crate embedded devices friendly? Since this issue was know before first major release maybe "not...

Here is a proposition of `OwnedBuf` trait that is build on top of `Buf`. That could be used to resolve my issue. The name is probably not best (BorrowedBuf (?))....

@Darksonn Thanks - this has a significant disadvantage. You can't call `buf.advance(self.remaining())`: > error[E0502]: cannot borrow `*buf` as mutable because it is also borrowed as immutable Do you have any...

@Ralith clarified ```rust impl { fn decode(buf: &'p mut dyn Buf) -> Self { let x = buf.get_u8(); let r = Self { x, payload: (&*buf).bytes(), }; buf.advance(buf.remaining()); r }...

Yes I know that. This is why I proposed additional trait that allow you to do this. As far as I understand it `Bytes` and `&[u8]` could implement this trait....

Ok The workaround if sb is looking: ``` # inside my project $ git submodule add https://@git.private.com/repo/repo.git ``` Then edit `Cargo.toml` ```toml [dependencies] package = { path = "repo" }...