refactor: remove declaration of self consuming methods in exports

Co-authored-by: Filip Tibell <filip.tibell@gmail.com>
This commit is contained in:
Erica Marigold 2023-09-04 12:29:06 +05:30 committed by GitHub
parent 91da9b8f4d
commit a43c324591
Signed by: DevComp
GPG key ID: 4AEE18F83AFDEB23

View file

@ -43,9 +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("toIsoDate", |_, this| Ok(DateTime::to_iso_date(&this).map_err(|()| LuaError::external(
"failed to parse DateTime object, invalid",
))))?
.with_function( .with_function(
"formatTime", "formatTime",
|_, (this, timezone, fmt_str, locale): (DateTime, LuaValue, LuaString, LuaString)| { |_, (this, timezone, fmt_str, locale): (DateTime, LuaValue, LuaString, LuaString)| {