You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Can we have a Macro to do the open and assign. Also, since we return a Future, can this be async?
Somehting like ASSIGN OR RETURN
auto dsRes = mdio::Dataset::Open(dataset_path, mdio::constants::kOpen);
if (!dsRes.status().ok()) {
return dsRes.status();
}
mdio::Dataset ds = dsRes.value();
Is there a macro for this pattern, it's fine but I makes for more reading.
if (!spec.status().ok()) {
// Something went wrong with Tensorstore retrieving the spec
return spec.status();
}
auto specJsonResult = spec.value().ToJson(IncludeDefaults{});
if (!specJsonResult.status().ok()) {
return specJsonResult.status();
}
Somehting like ASSIGN OR RETURN
auto dsRes = mdio::Dataset::Open(dataset_path, mdio::constants::kOpen);
if (!dsRes.status().ok()) {
return dsRes.status();
}
mdio::Dataset ds = dsRes.value();
Is there a macro for this pattern, it's fine but I makes for more reading.
Originally posted by @blasscoc in #115 (comment)
The text was updated successfully, but these errors were encountered: