Skip to content

Commit

Permalink
chore(deps): bump mlua from 0.9.9 to 0.10.0
Browse files Browse the repository at this point in the history
  • Loading branch information
vhyrro committed Oct 28, 2024
1 parent 5f6eb66 commit c622c96
Show file tree
Hide file tree
Showing 10 changed files with 30 additions and 29 deletions.
11 changes: 6 additions & 5 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion rocks-lib/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ git2 = "0.19.0"
html-escape = "0.2.13"
httpdate = "1.0.3"
itertools = "0.13.0"
mlua = { version = "0.9.6", features = ["luajit52", "serialize"] }
mlua = { version = "0.10.0", features = ["luajit52", "serialize", "send"] }
pathdiff = "0.2.1"
reqwest = "0.12.0"
semver = "1.0.22"
Expand Down
2 changes: 1 addition & 1 deletion rocks-lib/resources/test/sample-tree/5.1/lock.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"version":"1.0.0","rocks":{"d7164c4921869877c7f29fce3f14b8ea78e0aec0d0c36123a3a920a894785ea5":{"name":"neorg","version":"8.0.0-1","pinned":false,"dependencies":["48ec344951668eca0e0a4ff284d804a11e4e709194df3191a72ed8fac89cf2e0"],"constraint":null,"hashes":{"rockspec":"sha256-uU0nuZNNPgilLlLX2n2r+sSE7+N6U4DukIj3rOLvzek=","source":"sha256-uU0nuZNNPgilLlLX2n2r+sSE7+N6U4DukIj3rOLvzek="}},"48ec344951668eca0e0a4ff284d804a11e4e709194df3191a72ed8fac89cf2e0":{"name":"lua-cjson","version":"2.1.0-1","pinned":false,"dependencies":[],"constraint":null,"hashes":{"rockspec":"sha256-uU0nuZNNPgilLlLX2n2r+sSE7+N6U4DukIj3rOLvzek=","source":"sha256-uU0nuZNNPgilLlLX2n2r+sSE7+N6U4DukIj3rOLvzek="}},"aa0a5bcd396f3b8e59fa9dd8059a06c3bf4952f48473214d96fc46895edb59f0":{"name":"neorg","version":"8.8.1-1","pinned":false,"dependencies":["48ec344951668eca0e0a4ff284d804a11e4e709194df3191a72ed8fac89cf2e0"],"constraint":null,"hashes":{"rockspec":"sha256-uU0nuZNNPgilLlLX2n2r+sSE7+N6U4DukIj3rOLvzek=","source":"sha256-uU0nuZNNPgilLlLX2n2r+sSE7+N6U4DukIj3rOLvzek="}}},"entrypoints":["d7164c4921869877c7f29fce3f14b8ea78e0aec0d0c36123a3a920a894785ea5","aa0a5bcd396f3b8e59fa9dd8059a06c3bf4952f48473214d96fc46895edb59f0"]}
{"version":"1.0.0","rocks":{"aa0a5bcd396f3b8e59fa9dd8059a06c3bf4952f48473214d96fc46895edb59f0":{"name":"neorg","version":"8.8.1-1","pinned":false,"dependencies":["48ec344951668eca0e0a4ff284d804a11e4e709194df3191a72ed8fac89cf2e0"],"constraint":null,"hashes":{"rockspec":"sha256-uU0nuZNNPgilLlLX2n2r+sSE7+N6U4DukIj3rOLvzek=","source":"sha256-uU0nuZNNPgilLlLX2n2r+sSE7+N6U4DukIj3rOLvzek="}},"48ec344951668eca0e0a4ff284d804a11e4e709194df3191a72ed8fac89cf2e0":{"name":"lua-cjson","version":"2.1.0-1","pinned":false,"dependencies":[],"constraint":null,"hashes":{"rockspec":"sha256-uU0nuZNNPgilLlLX2n2r+sSE7+N6U4DukIj3rOLvzek=","source":"sha256-uU0nuZNNPgilLlLX2n2r+sSE7+N6U4DukIj3rOLvzek="}},"d7164c4921869877c7f29fce3f14b8ea78e0aec0d0c36123a3a920a894785ea5":{"name":"neorg","version":"8.0.0-1","pinned":false,"dependencies":["48ec344951668eca0e0a4ff284d804a11e4e709194df3191a72ed8fac89cf2e0"],"constraint":null,"hashes":{"rockspec":"sha256-uU0nuZNNPgilLlLX2n2r+sSE7+N6U4DukIj3rOLvzek=","source":"sha256-uU0nuZNNPgilLlLX2n2r+sSE7+N6U4DukIj3rOLvzek="}}},"entrypoints":["aa0a5bcd396f3b8e59fa9dd8059a06c3bf4952f48473214d96fc46895edb59f0","d7164c4921869877c7f29fce3f14b8ea78e0aec0d0c36123a3a920a894785ea5"]}
6 changes: 3 additions & 3 deletions rocks-lib/src/package/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -195,10 +195,10 @@ impl<'de> Deserialize<'de> for PackageName {
}
}

impl<'lua> FromLua<'lua> for PackageName {
impl FromLua for PackageName {
fn from_lua(
value: mlua::prelude::LuaValue<'lua>,
lua: &'lua mlua::prelude::Lua,
value: mlua::prelude::LuaValue,
lua: &mlua::prelude::Lua,
) -> mlua::prelude::LuaResult<Self> {
Ok(Self::new(String::from_lua(value, lua)?))
}
Expand Down
6 changes: 3 additions & 3 deletions rocks-lib/src/package/version.rs
Original file line number Diff line number Diff line change
Expand Up @@ -71,10 +71,10 @@ impl<'de> Deserialize<'de> for PackageVersion {
}
}

impl<'lua> FromLua<'lua> for PackageVersion {
impl FromLua for PackageVersion {
fn from_lua(
value: mlua::prelude::LuaValue<'lua>,
lua: &'lua mlua::prelude::Lua,
value: mlua::prelude::LuaValue,
lua: &mlua::prelude::Lua,
) -> mlua::prelude::LuaResult<Self> {
let s = String::from_lua(value, lua)?;
Self::from_str(&s).map_err(|err| mlua::Error::DeserializeError(err.to_string()))
Expand Down
8 changes: 4 additions & 4 deletions rocks-lib/src/rockspec/build/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -165,8 +165,8 @@ impl BuildSpec {
}
}

impl<'lua> FromLua<'lua> for PerPlatform<BuildSpec> {
fn from_lua(value: Value<'lua>, lua: &'lua Lua) -> mlua::Result<Self> {
impl FromLua for PerPlatform<BuildSpec> {
fn from_lua(value: Value, lua: &Lua) -> mlua::Result<Self> {
let internal = PerPlatform::from_lua(value, lua)?;
let mut per_platform = HashMap::new();
for (platform, internal_override) in internal.per_platform {
Expand Down Expand Up @@ -307,8 +307,8 @@ struct BuildSpecInternal {
features: Option<Vec<String>>,
}

impl<'lua> FromLua<'lua> for PerPlatform<BuildSpecInternal> {
fn from_lua(value: Value<'lua>, lua: &'lua Lua) -> mlua::Result<Self> {
impl FromLua for PerPlatform<BuildSpecInternal> {
fn from_lua(value: Value, lua: &Lua) -> mlua::Result<Self> {
match &value {
list @ Value::Table(tbl) => {
let mut per_platform = match tbl.get("platforms")? {
Expand Down
6 changes: 3 additions & 3 deletions rocks-lib/src/rockspec/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -181,10 +181,10 @@ impl From<&str> for RockspecFormat {
}
}

impl<'lua> FromLua<'lua> for RockspecFormat {
impl FromLua for RockspecFormat {
fn from_lua(
value: mlua::prelude::LuaValue<'lua>,
lua: &'lua mlua::prelude::Lua,
value: mlua::prelude::LuaValue,
lua: &mlua::prelude::Lua,
) -> mlua::prelude::LuaResult<Self> {
let s = String::from_lua(value, lua)?;
Self::from_str(&s).map_err(|err| mlua::Error::DeserializeError(err.to_string()))
Expand Down
8 changes: 4 additions & 4 deletions rocks-lib/src/rockspec/platform.rs
Original file line number Diff line number Diff line change
Expand Up @@ -310,15 +310,15 @@ impl<T: Default> Default for PerPlatform<T> {
}
}

impl<'lua, T> FromLua<'lua> for PerPlatform<T>
impl<T> FromLua for PerPlatform<T>
where
T: PlatformOverridable,
T: PartialOverride,
T: DeserializeOwned,
T: Default,
T: Clone,
{
fn from_lua(value: Value<'lua>, lua: &'lua Lua) -> mlua::Result<Self> {
fn from_lua(value: Value, lua: &Lua) -> mlua::Result<Self> {
match &value {
list @ Value::Table(tbl) => {
let mut per_platform = match tbl.get("platforms")? {
Expand Down Expand Up @@ -357,15 +357,15 @@ pub struct PerPlatformWrapper<T, G> {
phantom: PhantomData<G>,
}

impl<'lua, T, G> FromLua<'lua> for PerPlatformWrapper<T, G>
impl<T, G> FromLua for PerPlatformWrapper<T, G>
where
T: FromPlatformOverridable<G, T, Err: ToString>,
G: PlatformOverridable<Err: ToString>,
G: DeserializeOwned,
G: Default,
G: Clone,
{
fn from_lua(value: Value<'lua>, lua: &'lua Lua) -> mlua::Result<Self> {
fn from_lua(value: Value, lua: &Lua) -> mlua::Result<Self> {
let internal = PerPlatform::from_lua(value, lua)?;
let per_platform: HashMap<_, _> = internal
.per_platform
Expand Down
4 changes: 2 additions & 2 deletions rocks-lib/src/rockspec/rock_source.rs
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,8 @@ impl FromPlatformOverridable<RockSourceInternal, Self> for RockSource {
}
}

impl<'lua> FromLua<'lua> for PerPlatform<RockSource> {
fn from_lua(value: Value<'lua>, lua: &'lua Lua) -> mlua::Result<Self> {
impl FromLua for PerPlatform<RockSource> {
fn from_lua(value: Value, lua: &Lua) -> mlua::Result<Self> {
let wrapper = PerPlatformWrapper::from_lua(value, lua)?;
Ok(wrapper.un_per_platform)
}
Expand Down
6 changes: 3 additions & 3 deletions rocks-lib/src/rockspec/test_spec.rs
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,10 @@ impl FromPlatformOverridable<TestSpecInternal, Self> for TestSpec {
}
}

impl<'lua> FromLua<'lua> for PerPlatform<TestSpec> {
impl FromLua for PerPlatform<TestSpec> {
fn from_lua(
value: mlua::prelude::LuaValue<'lua>,
lua: &'lua mlua::prelude::Lua,
value: mlua::prelude::LuaValue,
lua: &mlua::prelude::Lua,
) -> mlua::prelude::LuaResult<Self> {
let wrapper = PerPlatformWrapper::from_lua(value, lua)?;
Ok(wrapper.un_per_platform)
Expand Down

0 comments on commit c622c96

Please sign in to comment.