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:25:16 +05:30 committed by GitHub
parent 0561b8eea7
commit e161ce3da0
Signed by: DevComp
GPG key ID: 4AEE18F83AFDEB23

View file

@ -37,9 +37,6 @@ pub fn create(lua: &'static Lua) -> LuaResult<LuaTable> {
.with_function("fromUniversalTime", |lua, date_time: LuaValue| { .with_function("fromUniversalTime", |lua, date_time: LuaValue| {
Ok(DateTime::from_universal_time(DateTimeBuilder::from_lua(date_time, lua).ok())) Ok(DateTime::from_universal_time(DateTimeBuilder::from_lua(date_time, lua).ok()))
})? })?
.with_function("toUniversalTime", |_, this: DateTime| {
Ok(this.to_universal_time())
})?
.with_function("fromLocalTime", |lua, date_time: LuaValue| { .with_function("fromLocalTime", |lua, date_time: LuaValue| {
Ok(DateTime::from_local_time(DateTimeBuilder::from_lua(date_time, lua).ok())) Ok(DateTime::from_local_time(DateTimeBuilder::from_lua(date_time, lua).ok()))
})? })?