I think the code should be changed. Pointed out at https://github.com/lightningdevkit/rust-lightning/pull/2808#discussion_r1441702317