You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: hunger_system.rs
    path of file: ./repos/rustrogueliketutorial/chapter-75-darkplaza/src/systems
    
    the code of the file until where you have to start completion: use specs::prelude::*;
use crate::{HungerClock, HungerState, MyTurn, effects::*};

pub struct HungerSystem {}

impl<'a> S
    
    fn run(&mut self, data : Self::SystemData) {
        let (entities, mut hunger_clock, player_entity, turns) = data;

        for (entity, mut clock, _myturn) in (&entities, &mut hunger_clock, &turns).join() {
            clock.duration -= 1;
            if clock.duration < 1 {
                match clock.state {
                    HungerState::WellFed => {
                        clock.state = HungerState::Normal;
                        clock.duration = 200;
                        if entity == *player_entity {
                            crate::gamelog::Logger::new()
                                .color(rltk::ORANGE)
                                .append("You are no longer well fed")
                                .log();
                        }
                    }
                    HungerState::Normal => {
                        clock.state = HungerState::Hungry;
                        clock.duration = 200;
                        if entity == *player_entity {
                            crate::gamelog::Logger::new()
                                .color(rltk::ORANGE)
                                .append("You are hungry")
                                .log();
                        }
                    }
                    HungerState::Hungry => {
                        clock.state = HungerState::Starving;
                        clock.duration = 200;
                        if entity == *player_entity {
                            crate::gamelog::Logger::new()
                                .color(rltk::RED)
                                .append("You are starving!")
                                .log();
                        }
                    }
                    HungerState::Starving => {
                        // Inflict damage from hunger
                        if entity == *player_entity {
                            crate::gamelog::Logger::new()
                                .color(rltk::RED)
                                .append("Your hunger pangs are getting painful! You suffer 1 hp damage.")
                                .log();
                        }
                        add_effect(
                            None,
                            EffectType::Damage{ amount: 1},
                            Targets::Single{ target: entity }
                        );
                    }
                }
            }
        }
    }