summaryrefslogtreecommitdiffstats
path: root/library/cpp/yt/yson_string
diff options
context:
space:
mode:
Diffstat (limited to 'library/cpp/yt/yson_string')
-rw-r--r--library/cpp/yt/yson_string/string.cpp4
-rw-r--r--library/cpp/yt/yson_string/unittests/saveload_ut.cpp2
2 files changed, 3 insertions, 3 deletions
diff --git a/library/cpp/yt/yson_string/string.cpp b/library/cpp/yt/yson_string/string.cpp
index 2680cdbcdcf..7c7713b0d9a 100644
--- a/library/cpp/yt/yson_string/string.cpp
+++ b/library/cpp/yt/yson_string/string.cpp
@@ -156,8 +156,8 @@ TSharedRef TYsonString::ToSharedRef() const
[&] (const TSharedRangeHolderPtr& holder) {
return TSharedRef(Begin_, Size_, holder);
},
- [] (const TCowString& payload) {
- return TSharedRef::FromString(payload);
+ [&] (const TCowString& payload) {
+ return TSharedRef(Begin_, Size_, MakeSharedRangeHolder(payload));
});
}
diff --git a/library/cpp/yt/yson_string/unittests/saveload_ut.cpp b/library/cpp/yt/yson_string/unittests/saveload_ut.cpp
index a7700fb2ff6..bcb1bfa196b 100644
--- a/library/cpp/yt/yson_string/unittests/saveload_ut.cpp
+++ b/library/cpp/yt/yson_string/unittests/saveload_ut.cpp
@@ -31,7 +31,7 @@ TEST(TYsonStringTest, SaveLoadString)
TEST(TYsonStringTest, SaveLoadSharedRef)
{
- auto ref = TSharedRef::FromString("My tests data");
+ auto ref = TSharedRef::FromString(std::string("My tests data"));
const TYsonString expected(ref);
TStringStream s;
::Save(&s, expected);