Skip to content

Commit

Permalink
remove ok
Browse files Browse the repository at this point in the history
  • Loading branch information
alevenberg committed Jul 19, 2023
1 parent 264ceff commit b86bf75
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion google/cloud/pubsub/samples/samples.cc
Original file line number Diff line number Diff line change
Expand Up @@ -442,7 +442,7 @@ void CreateCloudStorageSubscription(
pubsub::Subscription(project_id, std::move(subscription_id)),
pubsub::SubscriptionBuilder{}.set_cloud_storage_config(
pubsub::CloudStorageConfigBuilder{}.set_bucket(bucket)));
if (!sub.ok()) {
if (!sub) {
if (sub.status().code() == google::cloud::StatusCode::kAlreadyExists) {
std::cout << "The subscription already exists\n";
return;
Expand Down

0 comments on commit b86bf75

Please sign in to comment.