Skip to content

Commit

Permalink
Switched to stable Rust
Browse files Browse the repository at this point in the history
  • Loading branch information
ilya-epifanov committed Sep 12, 2019
1 parent 15ff945 commit df84e03
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 11 deletions.
4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@ matrix:
env:
- TARGET=x86_64-unknown-linux-gnu
- BINARY_SUFFIX=linux-amd64
rust: nightly-2019-03-05
rust: stable
dist: xenial
- os: osx
env:
- BINARY_SUFFIX=macos
rust: nightly-2019-03-05
rust: stable

sudo: true
env:
Expand Down
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased] - ReleaseDate
### Changed
* Switched to stable Rust

## [0.5.1] - 2019-04-15
### Added
* HiDPI support
Expand Down
2 changes: 1 addition & 1 deletion appveyor.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
environment:
RUST_BACKTRACE: 1
matrix:
- RUST: nightly-2019-03-05
- RUST: stable
BITS: 64

install:
Expand Down
17 changes: 9 additions & 8 deletions src/bin/gui.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#![feature(try_blocks)]

#[macro_use]
extern crate log;
#[macro_use]
Expand Down Expand Up @@ -172,24 +170,26 @@ impl Update for Win {
let (_, sender) = Channel::new(move |msg| {
stream.emit(msg);
});
let res = try {
let res = (|| {
let capture_device = self.model.opt.device()?;
let dut = self.model.device.clone();

thread::spawn(move || {
let res = try {
let res = (|| {
let trace: Arc<dyn ShareableTrace> =
Arc::from(dut.trace(&*capture_device)?);
info!("Got the trace");
sender
.send(Msg::TraceSucceeded(trace))
.expect("send message");
};
Ok(())
})();
if let Err(err) = res {
sender.send(Msg::TraceFailed(err)).expect("send message");
}
});
};
Ok(())
})();
if let Err(err) = res {
self.model.relm.stream().emit(Msg::TraceFailed(err));
}
Expand Down Expand Up @@ -379,7 +379,7 @@ impl Update for Win {

if dialog.run() == gtk::ResponseType::Accept.into() {
if let Some(filename) = dialog.get_filename() {
let res = try {
let res = (|| {
self.model.trace =
self.model.device.load_from_csv(filename)?.as_gui_trace();
info!("Got the trace");
Expand All @@ -389,7 +389,8 @@ impl Update for Win {
self.model.relm.stream().emit(Msg::UpdateDrawBuffer);

self.model.relm.stream().emit(Msg::FitModel);
};
Ok(())
})();
let _ = self.handle_error(res);
}
}
Expand Down

0 comments on commit df84e03

Please sign in to comment.