Skip to content

Commit

Permalink
Merge branch 'use-rustfmt-preview-component'
Browse files Browse the repository at this point in the history
  • Loading branch information
faern committed Feb 18, 2018
2 parents 5f15a7b + 1235520 commit 33a2eda
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 49 deletions.
12 changes: 6 additions & 6 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,20 +32,19 @@ matrix:
- yarn test


# Backend macOS
# Daemon - macOS
- language: rust
rust: stable
os: osx
cache: cargo

before_script: &rust_before_script
- export PATH=$HOME/.cargo/bin:$HOME/.local/bin:$PATH
- env
script: &rust_script
- cargo build --verbose
- cargo test --verbose

# Backend Linux
# Daemon - Linux
- language: rust
rust: nightly
os: linux
Expand All @@ -54,9 +53,10 @@ matrix:
script:
- cargo build --verbose
- cargo test --verbose
# Format only on nightly, since that is where rustfmt-nightly compiles
- export LD_LIBRARY_PATH=$(rustc --print sysroot)/lib:$LD_LIBRARY_PATH
- ./format.sh --write-mode=diff;
# Install and run rustfmt on nightly only until rustfmt.toml settings are stabilized.
- rustup component add rustfmt-preview
- rustfmt --version
- cargo fmt -- --write-mode=diff

- language: rust
rust: beta
Expand Down
40 changes: 0 additions & 40 deletions format.sh

This file was deleted.

6 changes: 4 additions & 2 deletions mullvad-types/src/relay_constraints.rs
Original file line number Diff line number Diff line change
Expand Up @@ -101,8 +101,10 @@ pub enum LocationConstraint {

#[derive(Debug, Clone, Eq, PartialEq, Deserialize, Serialize)]
pub enum TunnelConstraints {
#[serde(rename = "openvpn")] OpenVpn(OpenVpnConstraints),
#[serde(rename = "wireguard")] Wireguard(WireguardConstraints),
#[serde(rename = "openvpn")]
OpenVpn(OpenVpnConstraints),
#[serde(rename = "wireguard")]
Wireguard(WireguardConstraints),
}

impl Match<OpenVpnParameters> for TunnelConstraints {
Expand Down
2 changes: 1 addition & 1 deletion rustfmt.toml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
required_version = "0.3.6"
required_version = "0.3.8"

# Activation of features, almost objectively better ;)
reorder_imports = true
Expand Down

0 comments on commit 33a2eda

Please sign in to comment.