Skip to content

Commit 403d89f

Browse files
Auto-merge for PR #107 via VersionBot
Transitioning to CircleCI and running latest clippy and rustfmt
2 parents 054da00 + 2f66861 commit 403d89f

18 files changed

Lines changed: 312 additions & 319 deletions

.circleci/config.yml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
2+
build: &build
3+
docker:
4+
- image: majorz/rust-$CIRCLE_JOB:rust-1.23.0
5+
steps:
6+
- checkout
7+
- run: cargo build
8+
9+
version: 2
10+
11+
jobs:
12+
aarch64:
13+
<<: *build
14+
rpi:
15+
<<: *build
16+
armv7hf:
17+
<<: *build
18+
i386:
19+
<<: *build
20+
amd64:
21+
<<: *build
22+
test:
23+
docker:
24+
- image: majorz/rust-test-deploy:rust-nightly-2018-01-08
25+
steps:
26+
- checkout
27+
- run: cargo fmt -- --write-mode=diff
28+
- run: cargo clippy -- -D warnings
29+
30+
workflows:
31+
version: 2
32+
test:
33+
jobs:
34+
- test
35+
build:
36+
jobs:
37+
- aarch64
38+
- rpi
39+
- armv7hf
40+
- i386
41+
- amd64

.editorconfig

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,6 @@ indent_size = 4
88

99
[*.md]
1010
trim_trailing_whitespace = false
11+
12+
[*.yml]
13+
indent_size = 2

.travis.yml

Lines changed: 4 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,4 @@
1-
dist: trusty
2-
sudo: required
3-
language: rust
4-
cache: cargo
5-
rust:
6-
- nightly
7-
- beta
8-
- stable
9-
before_install:
10-
- sudo apt-get -qq update
11-
- sudo apt-get install -yq --no-install-recommends libdbus-1-dev
12-
install:
13-
- type -p cargo-install-update || cargo install cargo-update
14-
- cargo install-update -i cargo-update
15-
- cargo install-update -i rustfmt
16-
- if [ $TRAVIS_RUST_VERSION == nightly ]; then
17-
cargo install-update -i clippy;
18-
fi
19-
script:
20-
- cargo fmt -- --write-mode=diff
21-
- if [ $TRAVIS_RUST_VERSION == nightly ]; then
22-
cargo clippy -- -D warnings;
23-
fi
24-
- cargo build
1+
language: generic
2+
script: printf 'empty'
3+
notifications:
4+
email: false

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file
44
automatically by Versionist. DO NOT EDIT THIS FILE MANUALLY!
55
This project adheres to [Semantic Versioning](http://semver.org/).
66

7+
## v0.8.3 - 2018-01-10
8+
9+
* Transitioning to CircleCI and running latest clippy and rustfmt #107 [majorz]
10+
711
## v0.8.2 - 2017-10-20
812

913
* Do not include clippy as an optional dependency #100 [majorz]

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "network-manager"
3-
version = "0.8.2"
3+
version = "0.8.3"
44
authors = ["Joseph Roberts <joe@resin.io>", "Zahari Petkov <zahari@resin.io>"]
55
description = "Rust NetworkManager bindings"
66
homepage = "https://github.com/resin-io-modules/network-manager"

README.md

Lines changed: 25 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,28 @@
11
network-manager
2-
==============
2+
===============
33

4-
[![License](https://img.shields.io/badge/license-Apache%202.0-blue.svg)](https://github.com/resin-io-modules/NetworkManager/blob/master/LICENSE)
5-
[![Build Status](https://travis-ci.org/resin-io-modules/network-manager.svg?branch=master)](https://travis-ci.org/resin-io-modules/network-manager)
64
> Rust NetworkManager bindings
5+
6+
[![Current Release](https://img.shields.io/github/release/resin-io-modules/network-manager.svg?style=flat-square)](https://github.com/resin-io-modules/network-manager/releases/latest)
7+
[![CircleCI status](https://img.shields.io/circleci/project/github/resin-io-modules/network-manager.svg?style=flat-square)](https://circleci.com/gh/resin-io-modules/network-manager)
8+
[![License](https://img.shields.io/github/license/resin-io-modules/network-manager.svg?style=flat-square)](https://github.com/resin-io-modules/network-manager/blob/master/LICENSE)
9+
[![Issues](https://img.shields.io/github/issues/resin-io-modules/network-manager.svg?style=flat-square)](https://github.com/resin-io-modules/network-manager/issues)
10+
11+
<div align="center">
12+
<sub>an open source :satellite: project by <a href="https://resin.io">resin.io</a></sub>
13+
</div>
14+
15+
***
16+
17+
Support
18+
-------
19+
20+
If you're having any problem, please [raise an issue](https://github.com/resin-io-modules/network-manager/issues/new) on GitHub or [contact us](https://resin.io/community/), and the resin.io team will be happy to help.
21+
22+
***
23+
24+
License
25+
-------
26+
27+
network-manager is free software, and may be redistributed under the terms specified in
28+
the [license](https://github.com/resin-io-modules/network-manager/blob/master/LICENSE).

examples/create.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,7 @@ extern crate network_manager;
33
use std::env;
44
use std::process;
55

6-
use network_manager::{NetworkManager, DeviceType};
7-
6+
use network_manager::{DeviceType, NetworkManager};
87

98
fn main() {
109
let args: Vec<String> = env::args().collect();

examples/hotspot.rs

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,22 +3,19 @@ extern crate network_manager;
33
use std::env;
44
use std::process;
55

6-
use network_manager::{NetworkManager, Device, DeviceType};
7-
6+
use network_manager::{Device, DeviceType, NetworkManager};
87

98
struct Options {
109
interface: Option<String>,
1110
ssid: String,
1211
password: Option<String>,
1312
}
1413

15-
1614
fn print_usage_and_exit() {
1715
println!("USAGE: hotspot [-i INTERFACE] SSID [PASSWORD]");
1816
process::exit(1);
1917
}
2018

21-
2219
fn parse_options() -> Options {
2320
let args: Vec<String> = env::args().collect();
2421

@@ -51,7 +48,6 @@ fn parse_options() -> Options {
5148
}
5249
}
5350

54-
5551
fn find_device(manager: &NetworkManager, interface: Option<String>) -> Option<Device> {
5652
if let Some(interface) = interface {
5753
let device = manager.get_device_by_interface(&interface).unwrap();
@@ -64,9 +60,9 @@ fn find_device(manager: &NetworkManager, interface: Option<String>) -> Option<De
6460
} else {
6561
let devices = manager.get_devices().unwrap();
6662

67-
let index = devices.iter().position(
68-
|d| *d.device_type() == DeviceType::WiFi,
69-
);
63+
let index = devices
64+
.iter()
65+
.position(|d| *d.device_type() == DeviceType::WiFi);
7066

7167
if let Some(index) = index {
7268
Some(devices[index].clone())
@@ -76,7 +72,6 @@ fn find_device(manager: &NetworkManager, interface: Option<String>) -> Option<De
7672
}
7773
}
7874

79-
8075
fn main() {
8176
let Options {
8277
interface,

rustfmt.toml

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,2 @@
1-
array_layout = "Block"
2-
chain_indent = "Block"
3-
control_style = "Rfc"
4-
fn_args_layout = "Block"
5-
fn_args_paren_newline = false
6-
fn_call_style = "Block"
7-
fn_call_width = 80
81
match_block_trailing_comma = true
9-
struct_lit_multiline_style = "ForceMulti"
10-
struct_lit_style = "Block"
112
use_try_shorthand = true

0 commit comments

Comments
 (0)