use published rosu-pp
This commit is contained in:
Generated
+2
-1
@@ -191,7 +191,8 @@ checksum = "3c55926c8f0fed1db12fbe96f7a6083a2c4186443dd32532ab34e6902467a4f3"
|
||||
[[package]]
|
||||
name = "rosu-pp"
|
||||
version = "1.0.0"
|
||||
source = "git+https://github.com/MaxOhn/rosu-pp?branch=next#711e548a7e29289a42dc8a5ff58ee3e1299218a6"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "26f146c66bed5900ee1fa2b55ef5cc5dd2dbd45e6cac0f7bee5cae535980afbc"
|
||||
dependencies = [
|
||||
"rosu-map",
|
||||
]
|
||||
|
||||
+1
-1
@@ -14,7 +14,7 @@ crate-type = ["cdylib"]
|
||||
|
||||
[dependencies]
|
||||
pyo3 = { version = "0.21", features = ["extension-module", "macros"] }
|
||||
rosu-pp = { git = "https://github.com/MaxOhn/rosu-pp", branch = "next", features = ["sync"] }
|
||||
rosu-pp = { version = "1.0.0", features = ["sync"] }
|
||||
|
||||
[profile.release]
|
||||
lto = true
|
||||
|
||||
+6
-6
@@ -205,16 +205,16 @@ impl PyPerformance {
|
||||
}
|
||||
|
||||
fn calculate(&self, args: &Bound<'_, PyAny>) -> PyResult<PyPerformanceAttributes> {
|
||||
let _map;
|
||||
let map;
|
||||
|
||||
let mut perf = if let Ok(attrs) = args.extract::<PyPerformanceAttributes>() {
|
||||
Performance::from_attributes(DifficultyAttributes::try_from(attrs.difficulty)?)
|
||||
Performance::new(DifficultyAttributes::try_from(attrs.difficulty)?)
|
||||
} else if let Ok(attrs) = args.extract::<PyDifficultyAttributes>() {
|
||||
Performance::from_attributes(DifficultyAttributes::try_from(attrs)?)
|
||||
} else if let Ok(map) = args.extract::<PyRef<'_, PyBeatmap>>() {
|
||||
_map = map;
|
||||
Performance::new(DifficultyAttributes::try_from(attrs)?)
|
||||
} else if let Ok(map_) = args.extract::<PyRef<'_, PyBeatmap>>() {
|
||||
map = map_;
|
||||
|
||||
Performance::from_map(&_map.inner)
|
||||
Performance::new(&map.inner)
|
||||
} else {
|
||||
return Err(ArgsError::new_err(
|
||||
"argument must be DifficultyAttributes, PerformanceAttributes, or a Beatmap",
|
||||
|
||||
Reference in New Issue
Block a user