Skip to content

Commit ba41c06

Browse files
committed
Publish v0.11.0
1 parent 88aaaeb commit ba41c06

File tree

13 files changed

+64
-29
lines changed

13 files changed

+64
-29
lines changed

CHANGELOG.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# 0.11.0 (2019-05-14)
2+
3+
This release focuses a lot on getting rendering working properly outside a web
4+
scenario.
5+
6+
- If the crate is compiled with the `image-shrinking` feature, which is
7+
activated by default, all images such as game and segment icons that are too
8+
large are automatically being shrunk to reduce the file size of splits files.
9+
[#145](https://github.com/LiveSplit/livesplit-core/pull/145)
10+
- [Flitter](https://github.com/alexozer/flitter) splits can now be parsed.
11+
[#105](https://github.com/LiveSplit/livesplit-core/issues/150)
12+
- The splits component now has support for custom columns.
13+
[#149](https://github.com/LiveSplit/livesplit-core/pull/149)
14+
- A generic renderer suitable for targeting various graphics frameworks has been
15+
implemented. It is available via the `rendering` feature.
16+
[#163](https://github.com/LiveSplit/livesplit-core/pull/163)
17+
- A software renderer using the generic renderer has been implemented as well.
18+
While certainly slower than the GPU based rendering, it offers portable
19+
rendering of the layouts without a need for a GPU. It is mostly suitable for
20+
screenshots. It is available via the `software-rendering` feature.
21+
[#163](https://github.com/LiveSplit/livesplit-core/pull/163)
22+
- The Layout files of the original LiveSplit can now be imported.
23+
[#103](https://github.com/LiveSplit/livesplit-core/pull/103)
24+
- Horizontal layouts are now supported in livesplit-core.
25+
[#180](https://github.com/LiveSplit/livesplit-core/pull/180)
26+
- Hotkeys can now be edited.
27+
[#152](https://github.com/LiveSplit/livesplit-core/pull/152)

Cargo.toml

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "livesplit-core"
3-
version = "0.10.0"
3+
version = "0.11.0"
44
authors = ["Christopher Serr <[email protected]>"]
55
documentation = "https://docs.rs/livesplit-core/"
66
repository = "https://github.com/LiveSplit/livesplit-core"
@@ -9,12 +9,13 @@ description = "livesplit-core is a library that provides a lot of functionality
99
readme = "README.md"
1010
keywords = ["speedrun", "timer", "livesplit"]
1111
include = [
12-
"/src/*",
1312
"/benches/*",
13+
"/src/*",
1414
"/Cargo.toml",
15+
"/CHANGELOG.md",
16+
"/CODE_OF_CONDUCT.md",
1517
"/LICENSE-APACHE",
1618
"/LICENSE-MIT",
17-
"/CODE_OF_CONDUCT.md",
1819
"/README.md"
1920
]
2021
edition = "2018"
@@ -37,7 +38,7 @@ chrono = { version = "0.4.0", features = ["serde", "clock"], default-features =
3738
derive_more = "0.14.0"
3839
image = { version = "0.21.0", features = ["png_codec"], default-features = false }
3940
indexmap = { version = "1.0.1", default-features = false, features = ["serde-1"] }
40-
livesplit-hotkey = { path = "crates/livesplit-hotkey", version = "0.4.0" }
41+
livesplit-hotkey = { path = "crates/livesplit-hotkey", version = "0.5.0" }
4142
odds = { version = "0.3.1", default-features = false }
4243
ordered-float = "1.0.0"
4344
palette = { version = "0.4.0", default-features = false }
@@ -55,11 +56,11 @@ euclid = { version = "0.19.5", default-features = false, optional = true }
5556
livesplit-title-abbreviations = { path = "crates/livesplit-title-abbreviations", version = "0.1.0", optional = true }
5657
lyon = { version = "0.13.0", default-features = false, optional = true }
5758
rusttype = { version = "0.7.3", default-features = false, optional = true }
59+
smallvec = { version = "0.6.9", default-features = false, optional = true }
5860

5961
# Software Rendering
6062
euc = { version = "0.3.0", default-features = false, optional = true }
6163
vek = { version = "0.9.6", default-features = false, optional = true }
62-
smallvec = { version = "0.6.9", default-features = false, optional = true }
6364

6465
[dev-dependencies]
6566
memmem = "0.1.1"
@@ -70,7 +71,7 @@ crc = "1.8.1"
7071
default = ["image-shrinking"]
7172
more-image-formats = ["image/webp", "image/pnm", "image/ico", "image/jpeg", "image/gif_codec", "image/tiff", "image/tga", "image/bmp", "image/hdr"]
7273
image-shrinking = ["more-image-formats"]
73-
rendering = ["more-image-formats", "euclid", "livesplit-title-abbreviations", "rusttype", "lyon", "smallvec"]
74+
rendering = ["more-image-formats", "euclid", "livesplit-title-abbreviations", "lyon", "rusttype", "smallvec"]
7475
software-rendering = ["rendering", "euc", "vek"]
7576

7677
[[bench]]

capi/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "livesplit-core-capi"
3-
version = "0.10.0"
3+
version = "0.11.0"
44
authors = ["Christopher Serr <[email protected]>"]
55
edition = "2018"
66

crates/livesplit-hotkey/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
[package]
22
name = "livesplit-hotkey"
3-
version = "0.4.0"
3+
version = "0.5.0"
44
authors = ["Christopher Serr <[email protected]>"]
55
documentation = "https://docs.rs/livesplit-hotkey/"
6-
repository = "https://github.com/LiveSplit/livesplit-core/tree/master/hotkey"
6+
repository = "https://github.com/LiveSplit/livesplit-core/tree/master/crates/livesplit-hotkey"
77
license = "Apache-2.0/MIT"
88
description = "livesplit-hotkey provides cross-platform global hotkey hooks."
99
keywords = ["speedrun", "timer", "livesplit", "hotkey", "keyboard"]

crates/livesplit-title-abbreviations/Cargo.toml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@
22
name = "livesplit-title-abbreviations"
33
version = "0.1.0"
44
authors = ["Christopher Serr <[email protected]>"]
5+
documentation = "https://docs.rs/livesplit-title-abbreviations/"
6+
repository = "https://github.com/LiveSplit/livesplit-core/tree/master/crates/livesplit-title-abbreviations"
7+
license = "Apache-2.0/MIT"
8+
description = "livesplit-title-abbreviations encapsulates the algorithm that LiveSplit uses to abbreviate game titles."
9+
keywords = ["speedrun", "timer", "livesplit", "title", "abbreviation"]
510
edition = "2018"
611

712
[dependencies]

src/comparison/best_segments.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ impl ComparisonGenerator for BestSegments {
3434

3535
let mut index = predictions
3636
.iter()
37-
.rposition(|p| p.is_some())
37+
.rposition(Option::is_some)
3838
.expect("There must always be a first sentinel prediction that is not None");
3939
while let Some(segment_index) = index.checked_sub(1) {
4040
let prediction =

src/comparison/worst_segments.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ impl ComparisonGenerator for WorstSegments {
3434

3535
let mut index = predictions
3636
.iter()
37-
.rposition(|p| p.is_some())
37+
.rposition(Option::is_some)
3838
.expect("There must always be a first sentinel prediction that is not None");
3939
while let Some(segment_index) = index.checked_sub(1) {
4040
let prediction =

src/component/detailed_timer/mod.rs

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,13 @@
77
use super::timer;
88
use crate::comparison::{self, best_segments, none};
99
use crate::settings::{Field, Gradient, SemanticColor, SettingsDescription, Value};
10-
use crate::timing::formatter::none_wrapper::DashWrapper;
1110
use crate::timing::formatter::{
12-
timer as formatter, Accuracy, DigitsFormat, Short, TimeFormatter, DASH,
11+
none_wrapper::DashWrapper, timer as formatter, Accuracy, DigitsFormat, Short, TimeFormatter,
12+
DASH,
13+
};
14+
use crate::{
15+
CachedImageId, GeneralLayoutSettings, Segment, TimeSpan, Timer, TimerPhase, TimingMethod,
1316
};
14-
use crate::{CachedImageId, GeneralLayoutSettings, TimeSpan, Timer, TimerPhase, TimingMethod};
1517
use serde_json::{to_writer, Result};
1618
use std::borrow::Cow;
1719
use std::io::Write;
@@ -278,7 +280,7 @@ impl Component {
278280
timer
279281
.current_split()
280282
.filter(|_| display_icon)
281-
.map(|s| s.icon()),
283+
.map(Segment::icon),
282284
)
283285
.map(str::to_owned);
284286

src/component/detailed_timer/tests.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ fn icon_handling() {
1919
assert!(component
2020
.state(&timer, layout_settings)
2121
.icon_change
22-
.filter(|s| s.is_empty())
22+
.filter(String::is_empty)
2323
.is_some());
2424

2525
assert!(component
@@ -45,7 +45,7 @@ fn icon_handling() {
4545
assert!(component
4646
.state(&timer, layout_settings)
4747
.icon_change
48-
.filter(|s| s.is_empty())
48+
.filter(String::is_empty)
4949
.is_some());
5050

5151
assert!(component
@@ -58,6 +58,6 @@ fn icon_handling() {
5858
assert!(component
5959
.state(&timer, layout_settings)
6060
.icon_change
61-
.filter(|s| s.is_empty())
61+
.filter(String::is_empty)
6262
.is_some());
6363
}

src/component/title/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
//! total number of finished runs can be shown.
55
66
use crate::settings::{Alignment, Color, Field, Gradient, SettingsDescription, Value};
7-
use crate::{CachedImageId, Timer, TimerPhase};
7+
use crate::{CachedImageId, Image, Timer, TimerPhase};
88
use serde_json::{to_writer, Result};
99
use std::borrow::Cow;
1010
use std::io::Write;
@@ -188,7 +188,7 @@ impl Component {
188188
let is_centered = match self.settings.text_alignment {
189189
Alignment::Center => true,
190190
Alignment::Left => false,
191-
Alignment::Auto => game_icon.map_or(true, |i| i.is_empty()),
191+
Alignment::Auto => game_icon.map_or(true, Image::is_empty),
192192
};
193193

194194
let game_name = if self.settings.show_game_name {

src/rendering/software/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
//! Provides a software renderer that can be used without a GPU. The rendering
2-
//! much slower than with a normal GPU, but might be sufficient for situations
3-
//! where you want to create a screenshot of the layout.
2+
//! is much slower than with a normal GPU, but might be sufficient for
3+
//! situations where you want to create a screenshot of the layout.
44
55
#[cfg(all(
66
test,

src/run/mod.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,11 @@ mod segment_history;
2626
#[cfg(test)]
2727
mod tests;
2828

29-
pub use self::attempt::Attempt;
30-
pub use self::editor::{Editor, RenameError};
31-
pub use self::run_metadata::RunMetadata;
32-
pub use self::segment::Segment;
33-
pub use self::segment_history::SegmentHistory;
29+
pub use attempt::Attempt;
30+
pub use editor::{Editor, RenameError};
31+
pub use run_metadata::RunMetadata;
32+
pub use segment::Segment;
33+
pub use segment_history::SegmentHistory;
3434

3535
use crate::comparison::{default_generators, personal_best, ComparisonGenerator};
3636
use crate::{AtomicDateTime, Image, Time, TimeSpan, TimingMethod};
@@ -573,7 +573,7 @@ impl Run {
573573
/// Returns the maximum index currently in use by the Attempt History. This
574574
/// mostly serves as a helper function for the Timer.
575575
pub fn max_attempt_history_index(&self) -> Option<i32> {
576-
self.attempt_history().iter().map(|x| x.index()).max()
576+
self.attempt_history().iter().map(Attempt::index).max()
577577
}
578578

579579
/// Applies some fixing algorithms on the Run. This includes fixing the

src/run/parser/time_split_tracker.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ pub fn parse<R: BufRead>(source: R, path_for_loading_other_files: Option<PathBuf
8686
let mut splits = line.split('\t');
8787
run.set_category_name(splits.next().ok_or(Error::ExpectedCategoryName)?);
8888
splits.next(); // Skip one element
89-
let mut comparisons = splits.map(|s| s.to_string()).collect::<Vec<_>>();
89+
let mut comparisons = splits.map(ToOwned::to_owned).collect::<Vec<_>>();
9090

9191
for comparison in &mut comparisons {
9292
let mut name = comparison.to_owned();

0 commit comments

Comments
 (0)