under the law that could not happen
he was given an opportunity to accept the secretary of the navy position
that acceptance - his own decision to accept that position - would have caused him to no longer be able to run for elected office
that was nothing more than a consequence of his choosing to accept the offered position
go here Federal Prosecution of Election Offenses
and then page 134
and read the following:the government does not find such offers of positions in the federal sector to fall within the intent of the law, which is to ferret out and prosecute quid pro quo circumstances ... such consideration is not to be found in this instanceAs with Section 606, the Criminal Division believes that Sections 600 and 601 were not intended to reach the consideration of political factors in the hiring or termination of the small category of senior public employees who perform policymaking or confidential duties for elected officials of federal, state, or local governments. With respect to such employees, a degree of political loyalty may be considered a necessary aspect of competent performance.