You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by mp...@apache.org on 2017/11/06 22:09:58 UTC

[3/7] mesos git commit: Flattened unnecessary `Optional>` to simply `Shared`.

Flattened unnecessary `Optional<Shared<T>>` to simply `Shared<T>`.

Since `Shared` is already nullable, avoiding the null state of
a `Shared` and wrapping it in an `Optional` doesn't add anything.
We should just use `Shared` as it is, and make use of the null state.

Review: https://reviews.apache.org/r/63591


Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/f9776ccb
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/f9776ccb
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/f9776ccb

Branch: refs/heads/master
Commit: f9776ccb47aecdee89bedcf7ef7ec4944e1855eb
Parents: 02bfc1b
Author: Michael Park <mp...@apache.org>
Authored: Mon Nov 6 10:45:59 2017 -0800
Committer: Michael Park <mp...@apache.org>
Committed: Mon Nov 6 13:57:05 2017 -0800

----------------------------------------------------------------------
 include/mesos/slave/containerizer.hpp | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/f9776ccb/include/mesos/slave/containerizer.hpp
----------------------------------------------------------------------
diff --git a/include/mesos/slave/containerizer.hpp b/include/mesos/slave/containerizer.hpp
index 838a8c3..c34f129 100644
--- a/include/mesos/slave/containerizer.hpp
+++ b/include/mesos/slave/containerizer.hpp
@@ -72,7 +72,7 @@ struct ContainerIO
     {
       switch (type_) {
         case Type::FD:
-          return process::Subprocess::FD(*fd_->get());
+          return process::Subprocess::FD(*fd_);
         case Type::PATH:
           return process::Subprocess::PATH(path_.get());
         default:
@@ -115,11 +115,11 @@ struct ContainerIO
 
     IO(Type _type, const std::string& _path)
       : type_(_type),
-        fd_(None()),
+        fd_(),
         path_(_path) {}
 
     Type type_;
-    Option<process::Shared<FDWrapper>> fd_;
+    process::Shared<FDWrapper> fd_;
     Option<std::string> path_;
   };