File tree Expand file tree Collapse file tree 3 files changed +7
-6
lines changed
Expand file tree Collapse file tree 3 files changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -117,23 +117,23 @@ namespace rift {
117117 // Unwrap the arguments with deduced types
118118 auto res = unwrapArgs<Args...>(args);
119119 if (res.isErr ()) {
120- return geode::Err (res.unwrapErr ());
120+ return geode::Err (std::move ( res) .unwrapErr ());
121121 }
122122
123123 // Apply the unwrapped arguments to the lambda function
124124 if constexpr (std::same_as<Ret, void >) {
125- std::apply (func, res.unwrap ());
125+ std::apply (func, std::move ( res) .unwrap ());
126126 return geode::Ok (Value ());
127127 } else {
128- Ret ret = std::apply (func, std::move (res.unwrap () ));
128+ Ret ret = std::apply (func, std::move (res) .unwrap ());
129129
130130 // Convert the result to the correct type
131131 if constexpr (std::same_as<Ret, RuntimeFuncResult>) {
132132 return ret; // Already a Result
133133 } else if constexpr (std::same_as<Ret, Value>) {
134134 return geode::Ok (std::move (ret)); // Forwards the Value
135135 } else {
136- return geode::Ok (Value (ret)); // Convert to Value
136+ return geode::Ok (Value (std::move ( ret) )); // Convert to Value
137137 }
138138 }
139139 };
Original file line number Diff line number Diff line change @@ -37,7 +37,8 @@ namespace rift {
3737 return geode::Ok (static_cast <int64_t >(arg.getString ().size ()));
3838 }
3939
40- return geode::Ok (static_cast <int64_t >(arg.toString ().size ()));
40+
41+ return geode::Ok (static_cast <int64_t >(fmt::formatted_size (" {}" , arg)));
4142 }
4243
4344 std::string toUpper (std::string&& str) noexcept {
Original file line number Diff line number Diff line change @@ -262,7 +262,7 @@ namespace rift {
262262 auto const & value = other.toString ();
263263
264264 if (value.empty ()) {
265- return geode::Ok (Value (str));
265+ return geode::Ok (Value (std::move ( str) ));
266266 }
267267
268268 size_t pos = 0 ;
You can’t perform that action at this time.
0 commit comments