Skip to content

Commit a7bcca0

Browse files
committed
meta: set msrv to 1.40
1 parent eaf001b commit a7bcca0

File tree

14 files changed

+45
-51
lines changed

14 files changed

+45
-51
lines changed

.travis.yml

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,9 @@ jobs:
66
- env: TEST_CMD=xvfb-run
77
rust: nightly
88
- env: TEST_CMD=xvfb-run
9-
rust: beta
10-
- env: TEST_CMD=xvfb-run
11-
rust: stable
9+
rust: 1.40.0
1210
- env: MACOSX_DEPLOYMENT_TARGET=10.7 SKIP_INSTALL=1
13-
rust: stable
11+
rust: 1.40.0
1412
os: osx
1513
before_install: |
1614
[ "x$SKIP_INSTALL" != "x" ] || sudo apt-get -qq update
@@ -24,7 +22,7 @@ script:
2422
- cargo build --verbose --tests --examples
2523
- $TEST_CMD cargo test
2624
after_success: |
27-
[ $TRAVIS_BRANCH = master ] &&
25+
[ $TRAVIS_BRANCH = trunk] &&
2826
[ $TRAVIS_PULL_REQUEST = false ] &&
2927
cd $TRAVIS_BUILD_DIR/iui/ &&
3028
cargo doc &&

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,10 @@
66

77
iui: [![iui crates.io version badge](https://img.shields.io/crates/v/iui.svg)](https://crates.io/crates/iui/)
88
[![docs.rs for iui](https://docs.rs/iui/badge.svg)](https://docs.rs/iui)
9+
![rustc 1.40](https://img.shields.io/badge/rustc-1.40-blue)
910
ui-sys: [![ui-sys crates.io version badge](https://img.shields.io/crates/v/ui-sys.svg)](https://crates.io/crates/ui-sys/)
1011
[![docs.rs for ui-sys](https://docs.rs/ui-sys/badge.svg)](https://docs.rs/ui)
12+
![rustc 1.40](https://img.shields.io/badge/rustc-1.40-blue)
1113

1214
`iui` is a **simple** (about 4 kLOC of Rust), **small** (about 800kb, including `libui`), **easy to distribute** (one shared library) GUI library, providing a **Rusty** user interface library that binds to **native APIs** via the [libui](https://github.com/andlabs/libui) and the `ui-sys` bindings crate.
1315

@@ -51,7 +53,7 @@ This repository contains multiple Rust crates:
5153
* `iui` is the safe Rust wrapper, to be used by most users.
5254
* `ui-sys` is the raw unsafe bindings to the `libui` C code. `libui` is included as a submodule.
5355

54-
Also be sure to look at our [changelog](CHANGELOG.md) and learn [how to contribute](CONTRIBUTING.md).
56+
Also be sure to look at our [changelog](CHANGELOG.md) and learn [how to contribute](CONTRIBUTING/CONTRIBUTING.md).
5557

5658

5759
### Building ui-sys

appveyor.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,15 +17,15 @@ environment:
1717
secure: q8Wqx0brgfpOYFQqWauvucE2h0o1WYb41a3gKaCKV9QiE4eTz6qLNlqyC3mdsp4Q
1818
branches:
1919
only:
20-
- master
20+
- trunk
2121
- auto
2222

2323
install:
2424
# If this is a PR and we're not allowed to test PRs, skip the whole build.
25-
# Also if we're on the master branch no need to run the full test suite, so
25+
# Also if we're on the trunk branch no need to run the full test suite, so
2626
# just do a smoke test.
2727
- if defined APPVEYOR_PULL_REQUEST_NUMBER if NOT defined ALLOW_PR appveyor exit
28-
- if "%APPVEYOR_REPO_BRANCH%" == "master" if NOT defined ALLOW_PR appveyor exit
28+
- if "%APPVEYOR_REPO_BRANCH%" == "trunk" if NOT defined ALLOW_PR appveyor exit
2929

3030
# Install MSYS2 and MINGW (32-bit & 64-bit)
3131
- ps: |
@@ -51,7 +51,7 @@ install:
5151
5252
# Install rust, x86_64-pc-windows-msvc host
5353
- appveyor-retry appveyor DownloadFile https://win.rustup.rs/ -FileName rustup-init.exe
54-
- rustup-init.exe -y --default-host=x86_64-pc-windows-msvc
54+
- rustup-init.exe -y --default-host=x86_64-pc-windows-msvc --default-toolchain=1.40.0
5555
- set PATH=%PATH%;C:\Users\appveyor\.cargo\bin
5656

5757
# Install the target we're compiling for

iui/Cargo.toml

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -30,17 +30,15 @@ categories = ["gui", "os::macos-apis", "os::unix-apis", "os::windows-apis"]
3030
license = "MIT"
3131

3232
[badges]
33-
# Travis CI: `repository` in format "<user>/<project>" is required.
34-
# `branch` is optional; default is `master`
35-
travis-ci = { repository = "rust-native-ui/libui-rs", branch = "master" }
36-
appveyor = { repository = "rust-native-ui/libui-rs", branch = "master" }
33+
travis-ci = { repository = "rust-native-ui/libui-rs", branch = "trunk" }
34+
appveyor = { repository = "rust-native-ui/libui-rs", branch = "trunk" }
3735

3836
maintenance = { status = "actively-developed" }
3937

4038
[dependencies]
41-
bitflags = "1.0"
39+
bitflags = "1"
4240
libc = "0.2"
43-
failure = "0.1.1"
41+
failure = "0.1"
4442
ui-sys = { path = "../ui-sys", version = "0.2.1" }
4543
regex = "1"
4644
lazy_static = "1"

iui/src/controls/area.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ impl RustAreaHandler {
3636
DragBroken: Some(drag_broken),
3737
KeyEvent: Some(key_event),
3838
},
39-
trait_object: trait_object,
39+
trait_object,
4040
});
4141

4242
extern "C" fn draw(

iui/src/controls/entry.rs

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,12 @@ use std::ffi::{CStr, CString};
99
use std::i32;
1010
use std::mem;
1111
use std::os::raw::c_void;
12+
use str_tools::{from_toolkit_string, to_toolkit_string};
13+
use ui::UI;
1214
use ui_sys::{
1315
self, uiCheckbox, uiCombobox, uiControl, uiEntry, uiMultilineEntry, uiRadioButtons, uiSlider,
1416
uiSpinbox,
1517
};
16-
use ui::UI;
17-
use str_tools::{from_toolkit_string, to_toolkit_string};
1818

1919
pub trait NumericEntry {
2020
fn value(&self, ctx: &UI) -> i32;
@@ -223,9 +223,7 @@ impl TextEntry for PasswordEntry {
223223

224224
impl TextEntry for MultilineEntry {
225225
fn value(&self, _ctx: &UI) -> String {
226-
unsafe {
227-
from_toolkit_string(ui_sys::uiMultilineEntryText(self.uiMultilineEntry))
228-
}
226+
unsafe { from_toolkit_string(ui_sys::uiMultilineEntryText(self.uiMultilineEntry)) }
229227
}
230228

231229
fn set_value(&mut self, _ctx: &UI, value: &str) {

iui/src/controls/layout.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ impl TabGroup {
212212
unsafe { ui_sys::uiTabDelete(self.uiTab, index) };
213213
Ok(n)
214214
} else {
215-
Err(UIError::TabGroupIndexOutOfBounds { index: index, n: n })
215+
Err(UIError::TabGroupIndexOutOfBounds { index, n })
216216
}
217217
}
218218

iui/src/controls/mod.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,9 +50,7 @@ impl Clone for Control {
5050
impl Control {
5151
/// Creates a new `Control` object from an existing `*mut uiControl`.
5252
pub unsafe fn from_ui_control(ui_control: *mut uiControl) -> Control {
53-
Control {
54-
ui_control: ui_control,
55-
}
53+
Control { ui_control }
5654
}
5755

5856
/// Returns the underlying `*mut uiControl`.

iui/src/draw/brush.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ impl Brush {
5858
Y1: linear_gradient_brush.end_y,
5959
OuterRadius: 0.0,
6060
Stops: linear_gradient_brush.stops.as_ptr() as *mut BrushGradientStop,
61-
NumStops: linear_gradient_brush.stops.len(),
61+
NumStops: linear_gradient_brush.stops.len() as u64,
6262
},
6363
phantom: PhantomData,
6464
},
@@ -77,7 +77,7 @@ impl Brush {
7777
Y1: radial_gradient_brush.outer_circle_center_y,
7878
OuterRadius: radial_gradient_brush.outer_radius,
7979
Stops: radial_gradient_brush.stops.as_ptr() as *mut BrushGradientStop,
80-
NumStops: radial_gradient_brush.stops.len(),
80+
NumStops: radial_gradient_brush.stops.len() as u64,
8181
},
8282
phantom: PhantomData,
8383
},

iui/src/draw/strokeparams.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
use draw::DrawContext;
22
use std::marker::PhantomData;
33
use std::os::raw::c_double;
4-
use ui::UI;
54
use ui_sys::uiDrawStrokeParams;
65

76
pub use ui_sys::uiDrawLineCap as LineCap;
@@ -32,7 +31,7 @@ impl StrokeParams {
3231
Thickness: self.thickness,
3332
MiterLimit: self.miter_limit,
3433
Dashes: self.dashes.as_ptr() as *mut c_double,
35-
NumDashes: self.dashes.len(),
34+
NumDashes: self.dashes.len() as u64,
3635
DashPhase: self.dash_phase,
3736
},
3837
phantom: PhantomData,

0 commit comments

Comments
 (0)