pw_rpc: Remove uses of PW_CHECK macros in headers

Change-Id: Ic8f8b6529a9d5eb8903fc4ba2a28c835abad5f78
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/43461
Commit-Queue: Wyatt Hepler <hepler@google.com>
Reviewed-by: Alexei Frolov <frolv@google.com>
diff --git a/pw_rpc/nanopb/public/pw_rpc/nanopb_test_method_context.h b/pw_rpc/nanopb/public/pw_rpc/nanopb_test_method_context.h
index ba20aa2..4efd0c9 100644
--- a/pw_rpc/nanopb/public/pw_rpc/nanopb_test_method_context.h
+++ b/pw_rpc/nanopb/public/pw_rpc/nanopb_test_method_context.h
@@ -298,7 +298,7 @@
       stream_ended_ = true;
       break;
     default:
-      PW_CRASH("Unhandled PacketType");
+      pw_assert_HandleFailure();  // Unhandled PacketType
   }
   return OkStatus();
 }
diff --git a/pw_rpc/public/pw_rpc/internal/call.h b/pw_rpc/public/pw_rpc/internal/call.h
index b5d5266..3e79657 100644
--- a/pw_rpc/public/pw_rpc/internal/call.h
+++ b/pw_rpc/public/pw_rpc/internal/call.h
@@ -16,7 +16,7 @@
 #include <cstddef>
 #include <cstdint>
 
-#include "pw_assert/check.h"
+#include "pw_assert/assert.h"
 #include "pw_rpc/internal/channel.h"
 
 namespace pw::rpc {
@@ -59,22 +59,22 @@
   ServerContext& context();
 
   Server& server() const {
-    PW_DCHECK_NOTNULL(server_);
+    PW_DASSERT(server_ != nullptr);
     return *server_;
   }
 
   Channel& channel() const {
-    PW_DCHECK_NOTNULL(channel_);
+    PW_DASSERT(channel_ != nullptr);
     return *channel_;
   }
 
   Service& service() const {
-    PW_DCHECK_NOTNULL(service_);
+    PW_DASSERT(service_ != nullptr);
     return *service_;
   }
 
   const internal::Method& method() const {
-    PW_DCHECK_NOTNULL(method_);
+    PW_DASSERT(method_ != nullptr);
     return *method_;
   }
 
diff --git a/pw_rpc/raw/public/pw_rpc/raw_test_method_context.h b/pw_rpc/raw/public/pw_rpc/raw_test_method_context.h
index aa69a99..0c005fd 100644
--- a/pw_rpc/raw/public/pw_rpc/raw_test_method_context.h
+++ b/pw_rpc/raw/public/pw_rpc/raw_test_method_context.h
@@ -297,7 +297,7 @@
       stream_ended_ = true;
       break;
     default:
-      PW_CRASH("Unhandled PacketType");
+      pw_assert_HandleFailure();  // Unhandled PacketType
   }
   return OkStatus();
 }