[libvirt-rust] change in coding style to follow rustfmt

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I'm proposing to merge a change [0] so the CI would check whether the
source code is well-formatted using rustfmt [1].

The aim is to add an easy convention to follow regarding the coding
style.

For contributors the natural thing to do before to submit any patches
is to verify the format using:

`cargo fmt -v -- --check`

The support of rustfmt via cargo can be added using:

`rustup component add rustfmt`

I did not want to pollute the mailing list with such big change which
doesn't bring anything.

Please let me know if you have any objections.


commit 851296786626d61ebec985a9caeb515514955dd8
Author: Sahid Orentino Ferdjaoui <sahid.ferdjaoui@xxxxxxxxxxxxx>
Date:   Tue Jan 28 15:05:44 2020 +0100

    ensure that the code is well formatted using rustfmt.
    
    In this commit we add CI rule so travis would check whether the code
    is well formatted using rustfmt.
    
    Signed-off-by: Sahid Orentino Ferdjaoui <sahid.ferdjaoui@xxxxxxxxxxxxx>

 .travis.yml               |    4 +
 README.md                 |    6 +
 examples/auth.rs          |   19 +-
 examples/hello.rs         |   76 +--
 examples/migrate.rs       |   35 +-
 examples/suspend.rs       |   31 +-
 src/connect.rs            |  534 ++++++++++--------
 src/domain.rs             | 1323 +++++++++++++++++++++++++--------------------
 src/domain_snapshot.rs    |   88 +--
 src/error.rs              |   13 +-
 src/interface.rs          |   38 +-
 src/lib.rs                |   30 +-
 src/network.rs            |   75 +--
 src/nodedev.rs            |  122 +++--
 src/nwfilter.rs           |   14 +-
 src/secret.rs             |   79 +--
 src/storage_pool.rs       |   99 ++--
 src/storage_vol.rs        |  218 ++++----
 src/stream.rs             |   27 +-
 tests/common/mod.rs       |  115 ++--
 tests/connect.rs          |   74 +--
 tests/domain.rs           |   14 +-
 tests/integration_qemu.rs |   39 +-
 tests/interface.rs        |    2 -
 tests/network.rs          |    1 -
 tests/storage_pool.rs     |   18 +-
 26 files changed, 1717 insertions(+), 1377 deletions(-)


Thanks.
s.

[0] https://github.com/sahid/libvirt-rust/commit/851296786626d61ebec985a9caeb515514955dd8
[1] https://travis-ci.org/sahid/libvirt-rust/builds/642931039






[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux