Karol Kuczmarski
Karol Kuczmarski
```rust #[derive(From)] struct Example { main_field: u32, some_extra: bool, } ``` Currently, the code above produces `impl From`. There is no way, AFAIK, to make derive_more create an `impl From`...
From a discussion on `#rust-beginners` there seems to be a need for `ByteOrder` implementation that dispatches to LE/BE based on runtime information. Essentially something like this: ```rust enum Endianess {...
```python mock_foo.assert_called_with(ARG % 2 == 0) mock_foo.assert_called_with(ARG.id == 42) mock_foo.assert_called_with(ARG('foo') == 'FOO') # etc. ``` as an equivalent of: ```python mock_foo.assert_called_with(ArgThat(lambda x: x % 2 == 0)) mock_foo.assert_called_with(ArgThat(lambda x: x.id...
Example: ```python mock_foo.assert_called_with(Eq(expected, on=attrgetter('id'))) ``` which is equivalent to: ```python mock_foo.assert_called_with(ArgThat(lambda x: x.id == expected.id)) ``` Optionally, if just a string is given to `on=`, treat it as an implicit...
`String` and `Unicode` matchers could accept optional argument for matching characters, e.g. letters, digits, or arbitrary predicates. It could take a set of characters, a callable, or a `Matcher`.
Essentially: ``` python ArgThat('x % 2 == 0') ``` Caveats: - Scoping. It's probably best if the compiled closure didn't include local scope of the matcher ctor invocation, but it...
Chained expressions such as `a | b | c` are currently represented as nested matchers (`Or(Or(a, b), c)`) because of operators associativity. These structures should be flattened instead (e.g. `Or(a,...
For matchers that are rarely/never parametrized (like `Integer`), the pair of parentheses required for their instantation is kind of a boilerplate. Ideally, we'd want the following two lines to be...
As opposed to boxing futures.
This may be eventually tweakable via a command-line flags, but I believe we should just include both in the search by default. A small complication is that these kind of...