runtime-rs: Merge branch 'main' into runtime-rs-merge-main-1

To keep runtime-rs up to date, we will merge main into runtime-rs every
week.

Fixes: #4790
Signed-off-by: Zhongtao Hu <zhongtaohu.tim@linux.alibaba.com>
This commit is contained in:
Zhongtao Hu
2022-08-02 10:46:42 +08:00
11 changed files with 134 additions and 20 deletions

View File

@@ -163,7 +163,7 @@ fn connect(name: &str, global_args: clap::ArgMatches) -> Result<()> {
let (logger, _guard) = logging::create_logger(name, crate_name!(), log_level, writer);
let timeout_nano: i64 = match args.value_of("timeout") {
Some(t) => utils::human_time_to_ns(t).map_err(|e| e)?,
Some(t) => utils::human_time_to_ns(t)?,
None => 0,
};

View File

@@ -684,7 +684,7 @@ fn oci_to_ttrpc(bundle_dir: &str, cid: &str, oci: &ociSpec) -> Result<ttrpcSpec>
let root = match &oci.root {
Some(r) => {
let ttrpc_root = root_oci_to_ttrpc(bundle_dir, r).map_err(|e| e)?;
let ttrpc_root = root_oci_to_ttrpc(bundle_dir, r)?;
protobuf::SingularPtrField::some(ttrpc_root)
}