```
warning: output filename collision.
The bin target `printerdemo` in package `printerdemo v1.5.0 (C:\dev\slint\examples\printerdemo\rust)` has the same output filename as the lib target `printerdemo` in package `printerdemo v1.5.0 (C:\dev\slint\examples\printerdemo\rust)`.
Colliding filename is: C:\dev\slint\target\debug\deps\printerdemo.pdb
The targets should have unique names.
Consider changing their names to be unique or compiling them separately.
This may become a hard error in the future; see <https://github.com/rust-lang/cargo/issues/6313>.
```
Note that the trick to use the same file for both was not ideal because
it produces a warning and would compile it twice if it was by default.
So just make both a lib.rs and a main.rs
This patch is mostly a rename now, but also contains a few small
cleanups.
SharedModel implements the Model trait itself and gracefully falls back
to an empty model is no Model was provided. This allows for some small
simplifications.
Also make sure to use the same comparision for SharedModels everywhere.
This fixes the last remaining clippy errors we had.
Change Model::row_data to return an Option<T> (rust) or std::optional<T> (c++)
Co-authored-by: Olivier Goffart <olivier@woboq.com>
Co-authored-by: Simon Hausmann <hausmann@gmail.com>
Last commit broke for structures containing models, because models are not PartialEq.
So we need to implement PartialEq for ModelHandle. Which means a struct needs to
be created