diff --git a/src/tests.rs b/src/tests.rs index 669e709..29da7b9 100755 --- a/src/tests.rs +++ b/src/tests.rs @@ -10,8 +10,8 @@ pub struct Vec2 { impl Userdata for Vec2 { fn build<'a>(_state: &State, builder: &mut UserdataBuilder<'a, Vec2>) -> crate::Result<()> { builder - .field_getter("x", |_, this| Ok(this.x)) - .field_getter("y", |_, this| Ok(this.y)) + .field_getter("x", |_, this| this.x) + .field_getter("y", |_, this| this.y) .field_setter("x", |_, this, x: f32| this.x = x) .field_setter("y", |_, this, y: f32| this.y = y) .function("new", |lua, (x, y)| lua.create_userdata(Vec2 { x, y }))