]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
cls/rgw: move stream operator from rgw_common.h
authorCasey Bodley <cbodley@redhat.com>
Sun, 7 Nov 2021 14:25:46 +0000 (09:25 -0500)
committerCasey Bodley <cbodley@redhat.com>
Fri, 19 Nov 2021 16:07:46 +0000 (11:07 -0500)
Signed-off-by: Casey Bodley <cbodley@redhat.com>
src/cls/rgw/cls_rgw_types.h
src/rgw/rgw_common.h

index 3e30725606be7290fb3e9cf7730463ed89bac644..7ad40d7edd072a542917281387f392d7c14e741f 100644 (file)
@@ -376,11 +376,6 @@ struct cls_rgw_obj_key {
     return !(k < *this);
   }
 
-  std::ostream& operator<<(std::ostream& out) const {
-    out << to_string();
-    return out;
-  }
-
   void encode(ceph::buffer::list &bl) const {
     ENCODE_START(1, 1, bl);
     encode(name, bl);
@@ -407,6 +402,13 @@ struct cls_rgw_obj_key {
 };
 WRITE_CLASS_ENCODER(cls_rgw_obj_key)
 
+inline std::ostream& operator<<(std::ostream& out, const cls_rgw_obj_key& o) {
+  out << o.name;
+  if (!o.instance.empty()) {
+    out << '[' << o.instance << ']';
+  }
+  return out;
+}
 
 struct rgw_bucket_dir_entry {
   /* a versioned object instance */
index eebf31e2dfe79a77fdcaf0c547ff8131611f192f..0a038d7e99c76d0313de638b688e6fbb05339938 100644 (file)
@@ -1492,14 +1492,6 @@ inline std::ostream& operator<<(std::ostream& out, const rgw_obj_key &o) {
   return out << o.to_str();
 }
 
-inline std::ostream& operator<<(std::ostream& out, const rgw_obj_index_key &o) {
-  if (o.instance.empty()) {
-    return out << o.name;
-  } else {
-    return out << o.name << "[" << o.instance << "]";
-  }
-}
-
 struct req_init_state {
   /* Keeps [[tenant]:]bucket until we parse the token. */
   std::string url_bucket;