diff --git a/esphome/components/sha256/sha256.cpp b/esphome/components/sha256/sha256.cpp index a0f82b78ef..699579251e 100644 --- a/esphome/components/sha256/sha256.cpp +++ b/esphome/components/sha256/sha256.cpp @@ -8,8 +8,7 @@ #include #endif -namespace esphome { -namespace sha256 { +namespace esphome::sha256 { #ifdef USE_ESP32 struct SHA256::SHA256Context { @@ -127,5 +126,4 @@ bool SHA256::equals_hex(const char *expected) { return this->equals_bytes(parsed); } -} // namespace sha256 -} // namespace esphome +} // namespace esphome::sha256 diff --git a/esphome/components/sha256/sha256.h b/esphome/components/sha256/sha256.h index 4d94c5b77d..dd1742ea0d 100644 --- a/esphome/components/sha256/sha256.h +++ b/esphome/components/sha256/sha256.h @@ -5,8 +5,7 @@ #include #include -namespace esphome { -namespace sha256 { +namespace esphome::sha256 { class SHA256 { public: @@ -32,5 +31,4 @@ class SHA256 { std::unique_ptr ctx_; }; -} // namespace sha256 -} // namespace esphome +} // namespace esphome::sha256