mirror of
https://github.com/lune-org/lune.git
synced 2025-05-04 10:43:57 +01:00
refactor: remove declaration of self consuming methods in exports
Co-authored-by: Filip Tibell <filip.tibell@gmail.com>
This commit is contained in:
parent
a43c324591
commit
1d83af9299
1 changed files with 0 additions and 13 deletions
|
@ -43,19 +43,6 @@ pub fn create(lua: &'static Lua) -> LuaResult<LuaTable> {
|
||||||
.with_function("fromIsoDate", |_, iso_date: LuaString| {
|
.with_function("fromIsoDate", |_, iso_date: LuaString| {
|
||||||
Ok(DateTime::from_iso_date(iso_date.to_string_lossy()))
|
Ok(DateTime::from_iso_date(iso_date.to_string_lossy()))
|
||||||
})?
|
})?
|
||||||
.with_function(
|
|
||||||
"formatTime",
|
|
||||||
|_, (this, timezone, fmt_str, locale): (DateTime, LuaValue, LuaString, LuaString)| {
|
|
||||||
Ok(DateTime::format_time(
|
|
||||||
&this,
|
|
||||||
Timezone::from_lua(timezone, lua)?,
|
|
||||||
fmt_str.to_string_lossy(),
|
|
||||||
locale.to_string_lossy(),
|
|
||||||
).map_err(|()| LuaError::external(
|
|
||||||
"failed to parse DateTime object, invalid",
|
|
||||||
)))
|
|
||||||
},
|
|
||||||
)?
|
|
||||||
.build_readonly()
|
.build_readonly()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue