Update Cargo script ([[lib]] becomes [lib]) -> it still doesn't work

Remove errors
Remove warnings

Some of the code is not really rust-like, for example :

```Rust
return result == 0;
// Should be :
result == 0
```